auditintegrationtests.java

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

JAVA
33
字号
package com.apress.springbook.chapter04;

import org.springframework.test.AbstractDependencyInjectionSpringContextTests;

public class AuditIntegrationTests extends
      AbstractDependencyInjectionSpringContextTests {
   
  protected String[] getConfigLocations() {
    return new String[] {
      "classpath:com/apress/springbook/chapter04/" +
        "audit.xml"
    };
  }

  private BusinessOperations businessOperations;

  public void setBusinessOperations (
           BusinessOperations businessOperations ) {
    this.businessOperations = businessOperations;
  }

  public void testSensitive() throws Exception {
 
    System.out.println("=== GOING TO CALL METHOD " + 
            "ON NEWLY CREATED OBJECT ===");
      
    this.businessOperations.sensitiveOperation(1);

    System.out.println("=== FINISHED CALLING METHOD " + 
            "ON NEWLY CREATED OBJECT ===");
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?