Field jdbcTemplate required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found
You need to declare JdbcTemplate
bean in any @Configuration
class, for example:
@Bean
public JdbcTemplate jdbcTemplate(DataSource dataSource) {
return new JdbcTemplate(dataSource);
}
Also, consider using spring-boot-starter-jdbc
instead of spring-jdbc
dependency. Starter module contains most of the libraries you'll need in the future.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>