Announcement Announcement Module
Collapse
No announcement yet.
"deactivate" MethodDefinitionSourceAdvisor for junit Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • "deactivate" MethodDefinitionSourceAdvisor for junit

    Hi,

    I have project with secured bussiness method via @Secured.
    In applicationContext_product I have

    Code:
    <bean class="org.acegisecurity.intercept.method.aopalliance.MethodDefinitionSourceAdvisor">
            <constructor-arg >
                <ref bean="methodSecurityInterceptor" />
            </constructor-arg>
    </bean>
    etc.

    All works fine.

    Now, I have unit tests with Unitils which has another applicationContext_unitils with some changes against
    product context (for example datasource).
    I want to run tests without security - so I want to "deactivate" MethodDefinitionSourceAdvisor in applicationContext_unitils.
    How can I simple do this?
    (without re-define methodSecurityInterceptor and objectDefinitionSource)

    Thanks for any hint.

  • #2
    Addition

    Addition: of course applicationContext_unitils only extends or changes applicationContext_product, junit uses both contexts. Priority is applicationContext_unitils.

    Comment

    Working...
    X