Org. Springframework. Beans. Factory. UnsatisfiedDependencyException: Error creating bean with the name 'jdbcConverter defined in the class path resource [org/springframework/boot/autoconfigure/data/JDBC/JdbcRepositoriesAutoConfiguration $SpringBootJdbcConfiguration class] : Unsatisfied dependency expressed through method' jdbcConverter parameter 4; Nested exception is org. Springframework. Beans. Factory. BeanCreationException: Error creating bean with the name 'jdbcDialect defined in the class path resource [org/springframework/boot/
Database link of what should be no problem, I use the method of the servlet can return data to the page, just don't know where spring boot here I made a mistake, below is the code, and trouble, I see, thank you,
@ RestController
Public class ProductHandler {
The @autowired
Private ProductRepository ProductRepository;
@ GetMapping ("/product/the.findall ")
Private List
Return productRepository. The.findall ();
}
}
@ Component
Public class ProductRepository implements prodcutRepository {
The @autowired
Private JdbcTemplate template;
@ Override
Public List
//List
int i=0;
Return the template. The query (" select * from the PRODUCT ", the new BeanPropertyRowMapper<> (the Product class));
}
@ Override
Public void findByid (int id) {
}
@ Override
Public void save Product (Product) {
}
@ Override
Public void update (Product Product) {
}
@ Override
Public void deletebyId (int id) {
}
}
@ Data
Public class Product {
Private long proid.
private String desc;
Private int inhand.
}
Spring. The datasource. Url=JDBC: mysql://localhost: 3306/Seneca
Spring. The datasource. The username=root
Spring. The datasource. Password=123456
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
CodePudding user response: