Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elasticsearch-demo
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
北京-王志杰
elasticsearch-demo
Commits
4a3c90a2
Commit
4a3c90a2
authored
Aug 18, 2022
by
北京-王志杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改es和mysql配置
parent
f8c5fa8c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
README.md
README.md
+3
-2
RestClientConfig.java
...a/com/gyb/elasticsearch/demo/config/RestClientConfig.java
+1
-1
application.properties
src/main/resources/application.properties
+5
-5
No files found.
README.md
View file @
4a3c90a2
...
...
@@ -9,7 +9,7 @@
*
Elasticsearch 配置
```
properties
#非必须配置,默认值为localhost
es.host
=
localhost
es.host
=
172.24.180.33
#非必须配置,默认值9200
es.port
=
9200
```
...
...
@@ -41,6 +41,6 @@ create table t_book
4.
启动项目
```
shell
./mvnw
spring-boot:run
mvn
spring-boot:run
```
5.
访问http://localhost:8080 进入首页进行书籍信息的添加和搜索
\ No newline at end of file
src/main/java/com/gyb/elasticsearch/demo/config/RestClientConfig.java
View file @
4a3c90a2
...
...
@@ -16,7 +16,7 @@ import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfig
*/
@Configuration
public
class
RestClientConfig
extends
AbstractElasticsearchConfiguration
{
@Value
(
"${es.host:
localhost
}"
)
@Value
(
"${es.host:
172.24.180.33
}"
)
private
String
esHost
;
@Value
(
"${es.port:9200}"
)
private
Integer
esPort
;
...
...
src/main/resources/application.properties
View file @
4a3c90a2
server.port
=
8080
spring.datasource.url
=
jdbc:m
ariadb://localhost:3306/test?serverTimezone=GMT%2B8
spring.datasource.url
=
jdbc:m
ysql://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.password
=
123456
spring.datasource.password
=
root
spring.jpa.show-sql
=
true
spring.jpa.open-in-view
=
false
#es.host=localhost
#
es.port
=
9200
\ No newline at end of file
es.host
=
172.24.180.33
es.port
=
9200
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment