Artifact XXX exploded: Error during artifact deployment. See server log for details.


    前排提醒,這只是篇排錯日記,可能解決不了你的問題。

 

  

  點擊右側查看tomcat日志

  看這個報錯信息,知道是映射文件路徑出錯了。

  改一下

 

 

然后又報新錯誤:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'employeeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.figsprite.Service.EmployeeService com.figsprite.Controller.EmployeeController.employeeService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.figsprite.Service.EmployeeService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

  可以知道是掃描包出現問題, = =這里因為懶,直接復制了SpringMVC的配置文件,導致Spring掃描不到包了

 

 

  = =還是錯

 

 

   在控制層加點料

 

 

 

 = =好熟悉的錯誤,剛學習SpringMVC時令人抓瘋的錯誤

 

 

= = 途中又碰到新問題

log4j:WARN No appenders could be found for logger

在web.xml里改一改

<context-param>
   <param-name>log4jConfigLocation</param-name>
   <param-value>/WEB-INF/config/log4j.properties</param-value>
</context-param>

······

<!-- 定義LOG4J監聽器 -->
<listener>
   <listener-class>
org.springframework.web.util.Log4jConfigListener
   </listener-class>
</listener>

 

 

至此,整合SSM宣告成功!!!萬里長征,剛剛開始

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM