解决(一般都是以下几个方面造成的):
-
private static String corpid(错误); private final String corpid(错误);
-
类上面缺少@Component注解;
-
没有使用@Autowired注解而是new 对象的方式,如下:
对:
@Autowired private Job job;
错(取到的值为NULL):
new Job();
解决(一般都是以下几个方面造成的):
private static String corpid(错误); private final String corpid(错误);
类上面缺少@Component注解;
没有使用@Autowired注解而是new 对象的方式,如下:
对:
@Autowired
private Job job;
错(取到的值为NULL):
new Job();