Commit 4a3c90a2 authored by 北京-王志杰's avatar 北京-王志杰

修改es和mysql配置

parent f8c5fa8c
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
* Elasticsearch 配置 * Elasticsearch 配置
```properties ```properties
#非必须配置,默认值为localhost #非必须配置,默认值为localhost
es.host=localhost es.host=172.24.180.33
#非必须配置,默认值9200 #非必须配置,默认值9200
es.port=9200 es.port=9200
``` ```
...@@ -41,6 +41,6 @@ create table t_book ...@@ -41,6 +41,6 @@ create table t_book
4. 启动项目 4. 启动项目
```shell ```shell
./mvnw spring-boot:run mvn spring-boot:run
``` ```
5. 访问http://localhost:8080 进入首页进行书籍信息的添加和搜索 5. 访问http://localhost:8080 进入首页进行书籍信息的添加和搜索
\ No newline at end of file
...@@ -16,7 +16,7 @@ import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfig ...@@ -16,7 +16,7 @@ import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfig
*/ */
@Configuration @Configuration
public class RestClientConfig extends AbstractElasticsearchConfiguration { public class RestClientConfig extends AbstractElasticsearchConfiguration {
@Value("${es.host:localhost}") @Value("${es.host:172.24.180.33}")
private String esHost; private String esHost;
@Value("${es.port:9200}") @Value("${es.port:9200}")
private Integer esPort; private Integer esPort;
......
server.port=8080 server.port=8080
spring.datasource.url=jdbc:mariadb://localhost:3306/test?serverTimezone=GMT%2B8 spring.datasource.url=jdbc:mysql://172.24.180.33:3306/test?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8&allowMultiQueries=true&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=123456 spring.datasource.password=root
spring.jpa.show-sql=true spring.jpa.show-sql=true
spring.jpa.open-in-view=false spring.jpa.open-in-view=false
#es.host=localhost es.host=172.24.180.33
#es.port=9200 es.port=9200
\ No newline at end of file \ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment