[RESOLVIDO] Spring Security (Custom Filter) - Falha de auto-config, não aceita mudança  XML
Índice dos Fóruns » Ferramentas, Frameworks e Utilitários
Autor Mensagem
Lavieri
GUJ Master
[Avatar]

Membro desde: 27/01/2004 13:39:31
Mensagens: 1851
Localização: João Pessoa / PB
Offline

Olá pessoal, estou tentando usar um Custom WebAuthenticationDetails no meu spring security.... preciso de informações que estao na request, se alguem souber outro modo de colocar no objeto Authentication, informações enviadas no post de login, eu aceito...

Para solucionar fiz um custom filter, que em resumo muda o meu WebAuthenticationDetails para um que eu criei... segue o que fiz


o problema é que depois que coloquei o custom filter recebo a msg de erro ao tentar levantar a applicação

org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Filter beans '<customUsernamePasswordAuthenticationFilter>' and 'Root bean: class [org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null' have the same 'order' value. When using custom filters, please make sure the positions do not conflict with default filters. Alternatively you can disable the default filters by removing the corresponding child elements from <http> and avoiding the use of <http auto-config='true'>.
Offending resource: ServletContext resource [/WEB-INF/applicationContext-security.xml]


Obs.: se eu tirar o custom-filter o sistema funciona normalmente, o problema é quando tento utilizar o custom filter

segue o xml onde registrei o bean... como podem ver, o auto-config esta como false, mesmo assim ele da a mensagem dizendo que tenho que dar avoid no auto-config=true

This message was edited 2 times. Last update was at 15/03/2011 14:45:42


Sun Certified Java Programmer (SCJP 6)

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
-Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999

Meu blog -> http://blog.tomazlavieri.com.br/
[ICQ]
Lavieri
GUJ Master
[Avatar]

Membro desde: 27/01/2004 13:39:31
Mensagens: 1851
Localização: João Pessoa / PB
Offline

resolvi... o problema todo era essa linha


que não podia existir... removi ela, e ai funcionou... e para subistituir o login-processing-url, fiz o seguinte



Sun Certified Java Programmer (SCJP 6)

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
-Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999

Meu blog -> http://blog.tomazlavieri.com.br/
[ICQ]
 
Índice dos Fóruns » Ferramentas, Frameworks e Utilitários
Ir para:   
Powered by JForum 2.1.8 © JForum Team