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

permission is ok

parent 0bec70c8
...@@ -22,7 +22,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; ...@@ -22,7 +22,7 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
*/ */
@Configuration @Configuration
@EnableWebSecurity @EnableWebSecurity
//@EnableGlobalMethodSecurity(securedEnabled = true) @EnableGlobalMethodSecurity(securedEnabled = true)
public class WebSecurityConfig extends WebSecurityConfigurerAdapter { public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired @Autowired
......
...@@ -19,7 +19,7 @@ public class HomeController { ...@@ -19,7 +19,7 @@ public class HomeController {
return "getUsers"; return "getUsers";
} }
@Secured("ROLE_ADMIN") @Secured({"ROLE_ADMIN","ROLE_USER"})
@RequestMapping(method = RequestMethod.POST) @RequestMapping(method = RequestMethod.POST)
@ResponseBody @ResponseBody
public String save() { 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