Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeanNameAutoProxyCreator Regexp to define beanNames patterns [SPR-1236] #5938

Closed
spring-issuemaster opened this issue Aug 18, 2005 · 1 comment
Closed

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 18, 2005

Steve Pincaud opened SPR-1236 and commented

In order to use regexp to define bean names in BeanNameAutoProxyCreator I propose to reaplace the code of org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator.isMatch

by :

protected boolean isMatch(String beanName, String mappedName) {
    
    Pattern p = Pattern.compile(mappedName);
    Matcher m = p.matcher(beanName);
    boolean isMatched = m.matches();
    
    return isMatched;
}

it should support regexp in configuration file, for instance :

<beans>
<bean id="fwk-debugInterceptor" class="org.springframework.aop.interceptor.DebugInterceptor"/>
<bean id="fwk-traceInterceptor" class="org.springframework.aop.interceptor.TraceInterceptor"/>
<bean id="fwk-performanceMonitorInterceptor" class="org.springframework.aop.interceptor.PerformanceMonitorInterceptor"/>
<bean id="fwk-jamonPerformanceMonitorInterceptor" class="org.springframework.aop.interceptor.JamonPerformanceMonitorInterceptor"/>
<bean id="fwk-debugAutoProxyCreator" class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
<property name="interceptorNames">
<list>
<idref bean="fwk-traceInterceptor"/>
<idref bean="fwk-performanceMonitorInterceptor"/>
</list>
</property>
<property name="beanNames">
<list>
<value>^oneup-.*Dao$</value>
<value>^oneup-.*Service$</value>
</list>
</property>
</bean>
</beans>
see also http://forum.springframework.org/viewtopic.php?t=8062


Affects: 1.1.5

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jun 18, 2012

Rossen Stoyanchev commented

This issue has been resolved through a selective bulk update, as part of a larger effort to better manage unresolved issues. To qualify for the update, the issue was either created before Spring 3.0 or affects a version older than Spring 3.0 and is not a bug.

There is a good chance the request was made obsolete, or at least partly outdated, by changes in later versions of Spring including deprecations. It is also possible it didn't get enough traction or we didn't have enough time to address it. One way or another, we didn't get to it.

If you believe the issue, or some aspects of it, are still relevant and worth pursuing at present you may re-open this issue or create a new one with a more up-to-date description.

We thank you for your contributions and encourage you to become familiar with the current process of managing Spring Framework JIRA issues that has been in use for over a year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.