securityaspect.java

来自「一些很有用的spring的书籍」· Java 代码 · 共 15 行

JAVA
15
字号
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 + =
减小字号Ctrl + -
显示快捷键?