1. 程式人生 > >SpringMVC查詢出現500,報錯Error creating bean with name 'menuController': Injection of autowired dependency

SpringMVC查詢出現500,報錯Error creating bean with name 'menuController': Injection of autowired dependency

解決方案:這是因為在service.impl包下的IEmpServiceImpl中沒有加@server,在控制層呼叫業務層,

                    必須在業務層先進行註解:

註明:必須新增@Service,代表當前類是一個service服務層元件,才能被spring掃描到,掃描到才能建立此類的例項物件