Commit b7692548 authored by 杨伊博's avatar 杨伊博

permission is ok

parent 0bec70c8
......@@ -22,7 +22,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
*/
@Configuration
@EnableWebSecurity
//@EnableGlobalMethodSecurity(securedEnabled = true)
@EnableGlobalMethodSecurity(securedEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
......
......@@ -19,7 +19,7 @@ public class HomeController {
return "getUsers";
}
@Secured("ROLE_ADMIN")
@Secured({"ROLE_ADMIN","ROLE_USER"})
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
public String save() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment