Announcement Announcement Module
No announcement yet.
Profiles & Component Scanning Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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:

    <beans profile="local,development,testing">
        <context:component-scan base-package=""/>
    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 "" so they aren't run in the production environment.

    Any ideas?