使自定义注解生效
//继承AbstractProcessor 重写init方法 发现打断点进不来,请问还需要做什么动作呢
public class MarkProcessor extends AbstractProcessor {
@Override
public void init(NutConfig config, ActionInfo ai) throws Throwable {
}
}
https://nutzam.com/core/mvc/action_chain.html 看这一页的最下面部分,用代码方式配置
@wendal 获取注解,要自己配置扫描包路径吗?
有类似的方法吗
有init方法,每个入口方法会对应一个processor,在里面取注解,不需要扫描啦
来自炫酷的 NutzCN
@wendal 我看里面有两个参数,请问注解是从那个形参上去呢,
public void init(NutConfig config, ActionInfo ai) throws Throwable {
//ActionInfo 的对象我看里面没有
//NutConfig 的对象没看到那个方法有
}
private String inputEncoding;
private String outputEncoding;
private String pathKey;
private String[] paths;
private Map<String, String> pathMap;
private String chainName;
private ObjectInfo<? extends HttpAdaptor> adaptorInfo;
private ViewMaker[] viewMakers;
private String okView;
private String failView;
private Set<String> httpMethods;
private ObjectInfo<? extends ActionFilter>[] filterInfos;
private String injectName;
private Class<?> moduleType;
private Method method;
private boolean pathTop;
private ClassMeta meta;
private String[] paramNames;
private Integer lineNumber;
method
来自炫酷的 NutzCN