1、对应elasticsearch版本为6.2.2,
对应的maven依赖为:
<dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>transport</artifactId> <version>6.4.3</version> </dependency> <dependency> <groupId>org.elasticsearch.client</groupId> <artifactId>elasticsearch-rest-high-level-client</artifactId> <version>6.4.3</version> </dependency>
2、springboot中使用spring-data-elasticsearch连接elasticsearch 6.2.2
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-elasticsearch --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-elasticsearch</artifactId> <version>2.1.7.RELEASE</version> </dependency>
需在application.properties中添加
spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300
3、springboot项目中使用jsp所需jar包
<dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> </dependency>
需在application.properties中添加
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp