Spring-Boot Elasticseach EntityMapper can not be autowired
问题 Based on this answer and the comments I implemented the code to receive the scores of an elastic search query. public class CustomizedHotelRepositoryImpl implements CustomizedHotelRepository { private final ElasticsearchTemplate elasticsearchTemplate; @Autowired public CustomizedHotelRepositoryImpl(ElasticsearchTemplate elasticsearchTemplate) { super(); this.elasticsearchTemplate = elasticsearchTemplate; } @Override public Page<Hotel> findHotelsAndScoreByName(String name) { QueryBuilder