📄 securityaspect.java
字号:
package com.apress.springbook.chapter04.aspects;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
@Aspect
public class SecurityAspect {
@Before("com.apress.springbook.chapter04.aspects." +
"SystemPointcutsAspect.inServiceLayer()")
public void denyAccessToAll() {
throw new IllegalStateException("This system has been compromised. " +
"Access is denied to all!");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -