Description of problem: Spring context:component-scan does not detect classes with Spring 2.5 and EAP6 When "<context:component-scan base-package="org.package"/>" is added to Spring XML, none of components (annotated with @Component, @Controller, etc) located in base-package are autodetected. Classes have to be defined manually in the xml (for example <bean id="clinicController" class="org.springframework.samples.petclinic.web.ClinicController"/>) because autodetection does not work.
Running Spring 2.5 on EAP5 or later requires the use of Snowdrop. http://docs.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/1.2/html/Snowdrop_User_Guide/ch02.html#id3193965
Created attachment 528939 [details] WAR of an affected application
I didn't provide enough information, I'm sorry. Snowdrop is being used. I added attachment with WAR of the application.
Tech note?
Marius, could you fill technical note for this?
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: TBD
Drafted a technical note, let me know what you think.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -TBD+The Spring context:component-scan fails to auto-detect classes with Spring 2.5 on EAP 6. The workaround for this issue is to manually define the classes in the XML.
Created attachment 569268 [details] WAR with corrections Corrections made as follows: - fixed web.xml to enable Snowdrop correctly - replaced Snowdrop 2.0.0.CR1 with 2.0.3.Final (as used by WFK2)
I don't think we need a technical note for this as the issue is obsolete. The reason why the submitted example failed was that Snowdrop was enabled incorrectly (verified and attached working example with Snowdrop enabled correctly). It can be verified by navigating to http://localhost:8080/petclinic-fixed/addPet.do (controller is enabled_ Please note that http://localhost:8080/petclinic-fixed/welcome.do does not work in this version because ClinicController is annotated with @Component instead of @Controller
Deleted Technical Notes Contents. Old Contents: The Spring context:component-scan fails to auto-detect classes with Spring 2.5 on EAP 6. The workaround for this issue is to manually define the classes in the XML.
Confirmed, should be closed and removed.