【发布时间】:2021-02-23 11:33:53
【问题描述】:
我有一个spring-boot 的非网络环境,因为我只需要一些类:
spring.main.web-application-type=none
问题:我如何告诉 spring 自动配置 org.springframework.core.convert.ConversionService(我需要 @Convert 自动映射 @Entity 对象)?
当我尝试自动连接对话服务时,它失败了:
@Autowired
private ConversionService conversionService;
public void fetch() {
BeanPropertyRowMapper.newInstance(MyObject.class, conversionService));
}
required a bean of type 'org.springframework.core.convert.ConversionService' that could not be found.
【问题讨论】:
标签: java spring spring-boot hibernate