- 在Service层通过@Autowired注入失败
错误信息:Request processing failed; nested exception is java.lang.NullPointerException
错误原因:通过@Autowird在Service中注入dao,之后在Controller中注入Service时也应使用@Autowird,否则会出现注入失败的问题
错误信息:Request processing failed; nested exception is java.lang.NullPointerException
错误原因:通过@Autowird在Service中注入dao,之后在Controller中注入Service时也应使用@Autowird,否则会出现注入失败的问题