Clean up examples for Spring Data Elasticsearch

This commit is contained in:
David Morley 2016-02-07 14:54:04 -06:00
parent a4b3920547
commit 9c60f32089
8 changed files with 18 additions and 20 deletions

View File

@ -1,4 +1,4 @@
package com.baeldung.config; package com.baeldung.spring.data.es.config;
import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.node.NodeBuilder; import org.elasticsearch.node.NodeBuilder;
@ -18,7 +18,7 @@ import java.nio.file.Paths;
@Configuration @Configuration
@EnableElasticsearchRepositories(basePackages = "com.baeldung.repository") @EnableElasticsearchRepositories(basePackages = "com.baeldung.repository")
@ComponentScan(basePackages = {"com.baeldung.service"}) @ComponentScan(basePackages = {"com.baeldung.spring.data.es.service"})
public class Config { public class Config {
private static Logger logger = LoggerFactory.getLogger(Config.class); private static Logger logger = LoggerFactory.getLogger(Config.class);

View File

@ -1,6 +1,6 @@
package com.baeldung.repository; package com.baeldung.spring.data.es.dao;
import com.baeldung.model.Article; import com.baeldung.spring.data.es.model.Article;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query; import org.springframework.data.elasticsearch.annotations.Query;

View File

@ -1,4 +1,4 @@
package com.baeldung.model; package com.baeldung.spring.data.es.model;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document; import org.springframework.data.elasticsearch.annotations.Document;

View File

@ -1,4 +1,4 @@
package com.baeldung.model; package com.baeldung.spring.data.es.model;
public class Author { public class Author {

View File

@ -1,7 +1,6 @@
package com.baeldung.dao; package com.baeldung.spring.data.es.repository;
import com.baeldung.model.Article; import com.baeldung.spring.data.es.model.Article;
import com.baeldung.model.Article;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query; import org.springframework.data.elasticsearch.annotations.Query;

View File

@ -1,6 +1,6 @@
package com.baeldung.service; package com.baeldung.spring.data.es.service;
import com.baeldung.model.Article; import com.baeldung.spring.data.es.model.Article;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;

View File

@ -1,7 +1,7 @@
package com.baeldung.service; package com.baeldung.spring.data.es.service;
import com.baeldung.repository.ArticleRepository; import com.baeldung.spring.data.es.repository.ArticleRepository;
import com.baeldung.model.Article; import com.baeldung.spring.data.es.model.Article;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;

View File

@ -1,10 +1,9 @@
package com.baeldung; package com.baeldung.spring.data.es;
import com.baeldung.config.Config; import com.baeldung.spring.data.es.config.Config;
import com.baeldung.model.Article; import com.baeldung.spring.data.es.model.Article;
import com.baeldung.model.Author; import com.baeldung.spring.data.es.model.Author;
import com.baeldung.service.ArticleService; import com.baeldung.spring.data.es.service.ArticleService;
import org.elasticsearch.index.query.QueryBuilder;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;