Hi all,
Is it possible to use Spring XML namespaces with JavaConfig right now?
Something like this (spring security namespace) would be really cool to do:
These annotations should be very easy to intercept and interpret with AOP and the appropriate Builder.Code:@Configuration public class SecurityConfig { @Http(autoConfig=true, accessDeniedPage="/login.html", children= { interceptUrl(pattern="/secure/**", access="ROLE_USER"), interceptUrl(pattern="/**", access="IS_AUTHENTICATED_ANONYMOUSLY"), formLogin(authenticationFailureUrl="/login.html", defaultTargetUrl="/index.html", loginPage="login.html") }) Object http() { return null; } }
No needs to parse XML anymore which means that bean definition parsers and bean definitions would be not required anymore. Huge improvement!![]()


Reply With Quote