0
我有以下類@PreAuthorize兒童類
public abstract class BaseCotroller {
@RequestMapping("/m")
public String m() {
...
}
@RequestMapping("/n")
public String n() {
...
}
}
@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping("/a")
public class ACotroller extends BaseController {
@PreAuthorize("hasRole('ROLE_ADMIN')")
@Override
public String m() {
return super.m();
}
}
@PreAuthorize被應用於米,但不是爲N,但它應該是在類級別指定@PreAuthorize。 還是我錯過了沉重的打擊?