감사합니다 !!
혹시 보실진 모르겠지만
preauthorize 어노테이션이 동작하지를 않네요..
<!-- servlet-context.xml -->
<security:global-method-security pre-post-annotations="enabled" />
@PreAuthorize("isAuthenticated() and (( #returnObject.name == principal.name ) or hasRole('ROLE_ADMIN'))")
public void asd() {
System.out.println("okokok");
}
@RequestMapping(value="/" , method=RequestMethod.GET)
public String index() {
asd();
return "/index";
}
이것저것 검색해봤는데 안되네요..