Announcement Announcement Module
Collapse
No announcement yet.
Profiles & Component Scanning Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Profiles & Component Scanning

    Maybe this is a basic question, but I've searched and can't find the answer. I'm really trying to figure out if the behavior I'm seeing is a bug, or I'm just doing it wrong.

    In Spring 3.2.0, I'm using the following xml config:

    Code:
        
    <beans profile="local,development,testing">
        <context:component-scan base-package="com.foo.bar"/>
    </beans>
    I was expecting that this would cause the component scan to happen only in the specified environments. However, it appears that is not the case.

    I fixed the problem by adding @Profile annotations to the classes in the package "com.foo.bar" so they aren't run in the production environment.

    Any ideas?
Working...
X