【发布时间】:2018-05-24 12:47:46
【问题描述】:
我有两个 Spring boot 和 spring mvc 项目。我想得到spring mvc项目的服务。 Spring Boot 项目作为客户端工作。我添加了 spring mvc 项目名称作为 spring boot 项目中 pom.xml 的依赖项。然后我可以调用spring mvc项目的方法,但是里面的服务没有自动装配。
当我在调试时查看以下服务时它们为空。
@Autowired
PriceResultService priceResultService; --null
@Autowired
PriceFactorService priceFactorService; --null
@Autowired
OptionalExtrasService optionalExtrasService; --null
@Autowired
BaseCommonRulesService baseCommonRulesService; --null
@Autowired
BasePartyTypeRulesService basePartyTypeRulesService; --null
@Autowired
MedicalCommonRulesService medicalCommonRulesService; --null
@Autowired
OptionalExtraRulesService optionalExtraRulesService; --null
@Autowired
CoverLimitRulesService coverLimitRulesService; --null
如何解决,
【问题讨论】:
标签: spring spring-mvc spring-boot