我的道实现;
\\here are imports...
@Repository
public class CompanyDaoImp extends JdbcDaoSupport implements CompanyDao {
private static final String INSERTCOMPANY = "INSERT INTO b_company"
+ "(NAME)VALUES(?)";
这是我的豆子;
<?xml version=".........
<!-- TODO add the component-scan and annotation-config elements -->
<context:annotation-config/>
<context:component-scan base-package="com.some.company"/>
<bean id="companyAppDataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost:3306/companyapp"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
</bean>
</beans>
我不明白为什么我一直接受例外;.......调用init方法失败;嵌套异常是 java.lang.IllegalArgumentException: 'dataSource' or 'jdbcTemplate' is required.........