reset password
Author Message
lmann2
Posts: 156
Posted 20:26 Mar 04, 2015 |

If we use the userService bean instead of referring to datasource we should be able to use the getter and setter methods of user in Spring's EL in our DAO methods correct?  I know that if use datasource we have to use the principal object and the generic methods in userdetails ie ("principal.username"), but if we want to say access the user id getter/setter in the spring EL do we have to use "SecurityUtils.user.id"?

Last edited by lmann2 at 20:27 Mar 04, 2015.
cysun
Posts: 2935
Posted 21:35 Mar 04, 2015 |

1. Yes

2. If you replaced the default implementation of principal with your own, you can do "principal.id" in Spring EL.

No matter what you do, you can't use "SecurityUtils" in Spring EL.