Announcement Announcement Module
Collapse
No announcement yet.
spring的context:component-scan问题 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring的context:component-scan问题

    Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-configure/dispatcher-servlet.xml]; nested exception is java.lang.IllegalStateException: Annotation-specified bean name 'fileValidate' for bean class [eio.fckeditor.FileValidate] conflicts with existing, non-compatible bean definition of same name and class [sunray.base.filingcabinets.bo.FileValidate]

    eio.fckeditor.FileValidate里的FileValidate是工程1中的,sun ray.base.filingcabinets.bo.FileValidate里的FileValid ate是工程2中的,而且都有@Service("fileValidate"),只是不同包。为什么启动 tomcat的时候说重名?难道context:component-scan是全局的?所有工程下都不能同名?不过本地把这两个工程都启动,没有任何问题,只是服务器上的不可 以。服务器的tomcat配了虚拟目录,配了域名。和这个应该没啥关系吧?望高手解答,谢谢! !!!

  • #2
    谁能帮帮我?谢谢!!

    Comment

    Working...
    X