helloworld.java

来自「《基于Eclipse的开源框架技术与实战》[第9章]随书源码」· Java 代码 · 共 29 行

JAVA
29
字号
package com.free.spring.aop;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * <p>Title: Eclipse Plugin Development</p>
 * <p>Description: Free download</p>
 * <p>Copyright: Copyright (c) 2006</p>
 * <p>Company: Free</p>
 * @author gan.shu.man
 * @version 1.0
 */

public class HelloWorld implements IHelloWorld {
    protected static final Log log = LogFactory.getLog(HelloWorld.class);

    public String getContent(String helloworld, boolean showException) throws Exception {
        log.info(helloworld);

        //抛出异常,测试Throw advice
        if (showException){
        	throw  new Exception("test throw Advisor");
        }
        return helloworld;
    }
    
}

⌨️ 快捷键说明

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