-
Jun 20th, 2012, 12:14 PM
#1
Configure "global-method-security" programmatically in WebMvcConfigurationSupport?
In my spring application, I have 2 contexts:
* root "applicationContext", which is defined in an XML file.
* MVC "servlet" application context, which is defined programmatically.
I have to define the servlet context programmatically in order to set some Spring core parameters that are not exposed to the XML configuration. However, I now want to add method security via @PreAuthorize annotations.
I'm not sure how to do this. With the Spring core values, it's fairly easy to find them, starting by looking at the
WebMvcConfigurationSupport API.
Does anyone know how to add <global-method-security> support to by @Configuration class?:
@Configuration
@ComponentScan(basePackages={"com.myapp"})
public class MyConfiguration extends WebMvcConfigurationSupport {
// How to add <global-method-security> support???
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules