Elasticsearch-Web应用版
演示一个web中elasticsearch客户端的使用,更多使用方式请参考dawdler-client-plug-es.
1. 下载并运行
下载示例dawdler-tutorial.zip,版本为jdk1.8.
解压后,进入elasticsearch-single-user-web-api目录中.
运行UserWebApplication.java的main方法.
@DawdlerBootApplication
public class UserWebApplication {
public static void main(String[] args) throws Throwable {
DawdlerWebApplication.run(UserWebApplication.class, args);
}
}
通过postman或游览器访问 http://localhost:8085/user/list?pageOn=1
1.1 配置文件说明
1.1.1 elasticsearch.properties
elasticsearch连接配置也支持放在统一配置中心.
相关配置参考dawdler-es-core.