-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have a file for a project where I iomplementar spring security, but I've tried and does not work, here emplo I put a file in which you connect to database, I recognize the user and its assigned role but not access the pages, please who can review it and tell me where is the error .... because I lost a long time and I could not get it to work properly.
Ideally, the system validates the user with access permissions according to an assigned role, I have all DAO structure and function but the spring configuration is not working ... In console can see the recognition process when run the project.
Download project:
Database: http://www.mediafire.com/file/3xsgmdkq8oxnted/seguridad.sql or http://www.mediafire.com/?3xsgmdkq8oxnted
Project: http://www.mediafire.com/file/nd02ndi764v3z5g/Practica.war or http://www.mediafire.com/?nd02ndi764v3z5g
My email is [email protected]
Hi jaider2523,
you must debug the zksample2. I have looked in your code. It's not enough to to use the UserImpl. You need the PolicyManager which implements spring-security UserDetailsService.
There is the ONLY ONE NEEDED method.
@Override
public UserDetails loadUserByUsername(String userId) {
Have a look at the de.forsthaus.policy packages and set as many breakpoints as you can.
best
Stephan
PS: Sorry, no support for spring-security. That's not a 10 minutes copy and paste challenge.
Ok, but I did not understand your answer very well, I do implement this method in my project, but the problem is that I get redirected to the index page, if it recognizes the user, but does not enter the application.
Your check my code? ...... please check to help me ... I am very worried.
I have followed all your instructions above and I think that I have no errors in the structure of the project, but does not work, that is why I write.
Your check my code? ....
Have a look at the TWO index.zul files and where they are settled in Zksample2. Have according a look in the springSecurityContext about the ~/pages/index.zul.
Ok, I will review the code, but I have a question, your blog zk, Java, "openTruuls ™ and the world. blog about the zk framework", there is a tutorial about the configuration of spring, you need to complete ? ...
On the other hand in your zkexamploe 2 use AOP, but my project is not used.
Thanks for your help, I have not been set, but thank you very much.
1. Yeah, you are right. The part5 is missing.
I will have a look on it if i had the time for it. But this is not interesting for your problem it's about customizing/extending the login params.
2. There are many many sample codes in the net where you can see how to make the transaction (the commit/rollback stuff) manual by code. Search the hibernate forums about it.
best
Stephan
Ok Stephan, thanks..
Asked: 2011-05-25 11:29:08 +0800
Seen: 514 times
Last updated: Jun 01 '11