-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from Nawabali-project/feature/167/updateAll
게시글 일괄 조회 및 일괄수정 API 추가
- Loading branch information
Showing
12 changed files
with
203 additions
and
84 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 42 additions & 42 deletions
84
src/main/java/com/nawabali/nawabali/config/ElasticSearchConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
package com.nawabali.nawabali.config; | ||
|
||
import org.elasticsearch.client.RestHighLevelClient; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.data.elasticsearch.client.ClientConfiguration; | ||
import org.springframework.data.elasticsearch.client.RestClients; | ||
import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfiguration; | ||
import org.springframework.data.elasticsearch.core.ElasticsearchOperations; | ||
import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; | ||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; | ||
|
||
@Configuration | ||
@EnableElasticsearchRepositories | ||
public class ElasticSearchConfig extends AbstractElasticsearchConfiguration { | ||
|
||
@Value("${spring.elasticsearch.username}") | ||
private String username; | ||
|
||
@Value("${spring.elasticsearch.password}") | ||
private String password; | ||
|
||
@Value("${spring.elasticsearch.rest.uris}") | ||
private String[] esHost; | ||
|
||
@Override | ||
@Bean | ||
public RestHighLevelClient elasticsearchClient() { | ||
final ClientConfiguration clientConfiguration = ClientConfiguration.builder() | ||
.connectedTo(esHost[0]) | ||
.withBasicAuth(username,password) | ||
.build(); | ||
return RestClients.create(clientConfiguration).rest(); | ||
} | ||
|
||
@Bean | ||
public ElasticsearchOperations elasticsearchOperations(){ | ||
return new ElasticsearchRestTemplate(elasticsearchClient()); | ||
} | ||
} | ||
|
||
//package com.nawabali.nawabali.config; | ||
// | ||
//import org.elasticsearch.client.RestHighLevelClient; | ||
//import org.springframework.beans.factory.annotation.Value; | ||
//import org.springframework.context.annotation.Bean; | ||
//import org.springframework.context.annotation.Configuration; | ||
//import org.springframework.data.elasticsearch.client.ClientConfiguration; | ||
//import org.springframework.data.elasticsearch.client.RestClients; | ||
//import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfiguration; | ||
//import org.springframework.data.elasticsearch.core.ElasticsearchOperations; | ||
//import org.springframework.data.elasticsearch.core.ElasticsearchRestTemplate; | ||
//import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories; | ||
// | ||
//@Configuration | ||
//@EnableElasticsearchRepositories | ||
//public class ElasticSearchConfig extends AbstractElasticsearchConfiguration { | ||
// | ||
// @Value("${spring.elasticsearch.username}") | ||
// private String username; | ||
// | ||
// @Value("${spring.elasticsearch.password}") | ||
// private String password; | ||
// | ||
// @Value("${spring.elasticsearch.rest.uris}") | ||
// private String[] esHost; | ||
// | ||
// @Override | ||
// @Bean | ||
// public RestHighLevelClient elasticsearchClient() { | ||
// final ClientConfiguration clientConfiguration = ClientConfiguration.builder() | ||
// .connectedTo(esHost[0]) | ||
// .withBasicAuth(username,password) | ||
// .build(); | ||
// return RestClients.create(clientConfiguration).rest(); | ||
// } | ||
// | ||
// @Bean | ||
// public ElasticsearchOperations elasticsearchOperations(){ | ||
// return new ElasticsearchRestTemplate(elasticsearchClient()); | ||
// } | ||
//} | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.