@IocBean(create="init", depose="depose")
public class TimeModule {
@Inject
protected PropertiesProxy conf;
@ApiOperation(value = "获取当前毫秒数", notes = "服务器端的时间", httpMethod="GET", response=Long.class)
@At
@Ok("raw")
public long now() {
return System.currentTimeMillis();
}
public void init() {
System.out.println("init method");
}
public void depose() {}
}
设置了初始化方法,但是在其他地方,没有使用,无法执行init方法