Guest User

Untitled

a guest
Jan 20th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  5.  
  6. <bean id="dataSource"
  7. class="org.springframework.jdbc.datasource.DriverManagerDataSource">
  8. <property name="driverClassName" value="com.mysql.jdbc.Driver" />
  9. <property name="url" value="jdbc:mysql://localhost:3306/***" />
  10. <property name="username" value="***" />
  11. <property name="password" value="***" />
  12. </bean>
  13.  
  14. </beans>
  15.  
  16. @Autowired
  17. JdbcTemplate jdbcTemplate;
  18.  
  19. Unsatisfied dependency expressed through field 'jdbcTemplate'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.jdbc.core.JdbcTemplate' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
Add Comment
Please, Sign In to add comment