All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zusmart.sample.interceptor.ComponentInterceptor Maven / Gradle / Ivy

The newest version!
package com.zusmart.sample.interceptor;

import java.lang.reflect.Method;

import com.zusmart.inject.annotation.Component;
import com.zusmart.inject.annotation.Interceptor;
import com.zusmart.inject.annotation.Property;
import com.zusmart.inject.interceptor.InterceptorFactory;

@Component
@Interceptor("com.zusmart.sample.biz.impl.MemberBizImpl")
public class ComponentInterceptor extends InterceptorFactory{

	@Property("server.name")
	private String serverName;
	
	@Override
	protected void onBefore(Class targetClass, Method targetMethod, Object[] arguments) throws Throwable {
		System.err.println("before " + serverName);
	}

	@Override
	protected void onAfter(Class targetClass, Method targetMethod, Object[] arguments, Object result) throws Throwable {
		System.err.println("after ");
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy