直接上代码
public class UserValidator extends BaseValidator { @Inject UserService userService; //static UserService userService = Aop.get(UserService.class); }
用@Inject报错
四月 23, 2019 11:28:21 上午 com.jfinal.core.ActionHandler error 严重: /api/member/user/userinfoPut/ java.lang.NullPointerException at validator.user.UserValidator.validate(UserValidator.java:29)
用aop方式就没问题。
项目:JFinal