日期:2014-05-17 浏览次数:21285 次
java.lang.ClassNotFoundException: org.springframework.jdbc.core.JdbcTemplate
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
java.lang.Class.getDeclaredMethods0(Native Method)
java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
java.lang.Class.getDeclaredMethods(Class.java:1791)
? <bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate" >
<constructor-arg ref="dataSource" />
</bean>
public abstract class AbstractBaseDao {
// SPRING JDBC模板接口
private JdbcTemplate jdbcTemplate;
public JdbcTemplate getJdbcTemplate() {
return jdbcTemplate;
}
@Resource
public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
}
@Component("userDao")
public class UserDaoImpl extends AbstractBaseDao implements UserDao {
//用户登录
public boolean login(String userName, String passWord) {
@Service
@Component("userService")
public class UserServiceImpl implements UserService {
@Resource
private UserDao userDao;
@Controller
@RequestMapping(value = "/user")
public class UserController {
/**
* 用户业务接口
*/
@Autowired
private UserService userService;