Java变量的初始化顺序为:静态变量或静态语句块 –> 实例变量或初始化语句块 –> 构造方法 –> @Autowired

//声明
@Component(value = "Schedule.grossProfit")
public class GrossProfitScheduleService extends ScheduleService {}

//实例化
ScheduleService scheduleService = SpringContextUtil.getBean("Schedule." + jobName, ScheduleService.class);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-09-18
  • 2022-12-23
  • 2021-11-17
  • 2019-09-23
  • 2021-11-23
猜你喜欢
  • 2022-12-23
  • 2021-08-15
  • 2021-05-09
  • 2021-08-12
  • 2021-05-24
  • 2021-11-16
  • 2021-05-20
相关资源
相似解决方案