我正在使用如下的autowire:
@Autowired
@Required
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
但是错误就像
一样2014-12-02 06:37:04 DEBUG QuartzSchedulerThread:276 - batch acquisition of 1 triggers
2014-12-02 06:37:04 DEBUG JobRunShell:201 - Calling execute on job ETLConnectorJobGroup_ID16.ETLConnectorJob_ID16
2014-12-02 06:37:04 DEBUG SpringBeanAutowiringSupport:89 - Current WebApplicationContext is not available for processing of ConnectorScheduler: Make sure this class gets constructed in a Spring web application. Proceeding without injection.
Autowired
是否需要spring MVC,因为它抱怨WebApplicationContext
不可用
更新:
我错误地使用了MVC中的SpringBeanAutowiringSupport
,删除后错误消失了。