注入的jar包如果不能直接使用 @autowired 来使用,可以采用如下方法:

  1. @Configuration
  2. public class DemoConfiguration {
  3.     @Bean
  4.     public Demo demo() {
  5.      return new Demo(); //该对象为Jar包对象
  6.     }
  7. }

原文地址:https://blog.csdn.net/hackandly/article/details/100020001

相关文章:

  • 2022-02-19
  • 2021-09-12
  • 2022-12-23
  • 2021-05-18
  • 2022-12-23
  • 2021-10-21
  • 2021-11-19
猜你喜欢
  • 2021-12-16
  • 2021-09-25
  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2021-08-06
  • 2022-01-25
相关资源
相似解决方案