注入的jar包如果不能直接使用 @autowired 來使用,可以采用如下方法:
-
@Configuration
-
-
public
class DemoConfiguration {
-
-
@Bean
-
-
public Demo demo() {
-
-
return
new Demo();
//該對象為Jar包對象
-
-
}
-
-
}
原文地址:https://blog.csdn.net/hackandly/article/details/100020001