Simplest way to achieve HTTP Basic auth popup in Spring 3 when using annotated configuration
I've been trying to figure out how to get a basic HTTP Basic auth pop-up on a particular controller and its methods but can't seem to figure it out. The examples and documentation seem to all use XML configuration and I'm configuring my app entirely with annotations. I just need a s开发者_运维百科imple, hard coded username/password login. Any suggestions?
Configuring librabies (such as Spring Security) using namespace extentions is the only case when you have to use XML configs in Spring 3. So, you can't do it with annotations (actually you can, but it would be overcomplicated).
To include XML configuration into annotation-based configuration you can use @ImportResource
annotation.
精彩评论