Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d0ad68d9a | |||
| 52b6d050a5 | |||
| 801d282542 | |||
| 6389641d8d | |||
| b61c179013 | |||
| a5a6cebbdd | |||
| 8ec30dfff5 | |||
| caf2f1910a | |||
| 7dc975ed88 | |||
| 2d330adb5f | |||
| 975cba86aa | |||
| 0cbb7cd172 | |||
| 3bb84212ae | |||
| 87c356b458 | |||
| 3e888bd08d | |||
| e5c7acf4f0 | |||
| 49848c7402 | |||
| 3f9fb01ace | |||
| 7ec291d572 | |||
| 0aab5f940f | |||
| eedcd8685f | |||
| 64d03e82fd | |||
| e07288e6e1 | |||
| 0d15936e7c | |||
| 6f60464035 | |||
| 584dba0b23 | |||
| d41a925779 | |||
| 28e3a8c7fb | |||
| d4fed726fa | |||
| 45495603d9 | |||
| f5bee25fc6 | |||
| 1af59690eb | |||
| 5e658a8069 |
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-elasticsearch</artifactId>
|
||||
<version>1.1.0.RELEASE</version>
|
||||
<version>1.1.5.BUILD-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-parent</artifactId>
|
||||
<version>1.5.0.RELEASE</version>
|
||||
<version>1.5.5.BUILD-SNAPSHOT</version>
|
||||
<relativePath>../spring-data-build/parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<commonscollections>3.2.1</commonscollections>
|
||||
<commonslang>2.6</commonslang>
|
||||
<elasticsearch>1.3.2</elasticsearch>
|
||||
<springdata.commons>1.9.0.RELEASE</springdata.commons>
|
||||
<springdata.commons>1.9.5.BUILD-SNAPSHOT</springdata.commons>
|
||||
|
||||
</properties>
|
||||
|
||||
@@ -150,8 +150,8 @@
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-release</id>
|
||||
<url>http://repo.spring.io/libs-release</url>
|
||||
<id>spring-libs-snapshot</id>
|
||||
<url>https://repo.spring.io/libs-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
+26
@@ -15,8 +15,16 @@
|
||||
*/
|
||||
package org.springframework.data.elasticsearch.repository.config;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
|
||||
import org.springframework.core.annotation.AnnotationAttributes;
|
||||
import org.springframework.data.elasticsearch.annotations.Document;
|
||||
import org.springframework.data.elasticsearch.repository.ElasticsearchCrudRepository;
|
||||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
|
||||
import org.springframework.data.elasticsearch.repository.support.ElasticsearchRepositoryFactoryBean;
|
||||
import org.springframework.data.repository.config.AnnotationRepositoryConfigurationSource;
|
||||
import org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport;
|
||||
@@ -72,4 +80,22 @@ public class ElasticsearchRepositoryConfigExtension extends RepositoryConfigurat
|
||||
Element element = config.getElement();
|
||||
builder.addPropertyReference("elasticsearchOperations", element.getAttribute("elasticsearch-template-ref"));
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingAnnotations()
|
||||
*/
|
||||
@Override
|
||||
protected Collection<Class<? extends Annotation>> getIdentifyingAnnotations() {
|
||||
return Collections.<Class<? extends Annotation>>singleton(Document.class);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.repository.config.RepositoryConfigurationExtensionSupport#getIdentifyingTypes()
|
||||
*/
|
||||
@Override
|
||||
protected Collection<Class<?>> getIdentifyingTypes() {
|
||||
return Arrays.<Class<?>>asList(ElasticsearchRepository.class, ElasticsearchCrudRepository.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,98 @@
|
||||
Spring Data Elasticsearch Changelog
|
||||
===================================
|
||||
|
||||
Changes in version 1.1.4.RELEASE (2015-10-14)
|
||||
---------------------------------------------
|
||||
* DATAES-202 - Release 1.1.4 (Evans).
|
||||
|
||||
|
||||
Changes in version 1.3.0.RELEASE (2015-09-01)
|
||||
---------------------------------------------
|
||||
* DATAES-193 - Release 1.3 GA (Gosling).
|
||||
* DATAES-137 - Should work out of the box with Spring Data REST.
|
||||
|
||||
|
||||
Changes in version 1.3.0.RC1 (2015-08-04)
|
||||
-----------------------------------------
|
||||
* DATAES-186 - Release 1.3 RC1 (Gosling).
|
||||
* DATAES-182 - Switch from BeanWrapper to PersistentPropertyAccessor.
|
||||
|
||||
|
||||
Changes in version 1.2.2.RELEASE (2015-07-28)
|
||||
---------------------------------------------
|
||||
* DATAES-184 - Release 1.2.2 (Fowler).
|
||||
|
||||
|
||||
Changes in version 1.0.6.RELEASE (2015-07-01)
|
||||
---------------------------------------------
|
||||
* DATAES-173 - Release 1.0.6 (Dijkstra).
|
||||
|
||||
|
||||
Changes in version 1.1.3.RELEASE (2015-07-01)
|
||||
---------------------------------------------
|
||||
* DATAES-174 - Release 1.1.3 (Evans).
|
||||
|
||||
|
||||
Changes in version 1.2.1.RELEASE (2015-06-30)
|
||||
---------------------------------------------
|
||||
* DATAES-175 - Release 1.2.1 (Fowler).
|
||||
* DATAES-164 - CriteriaQuery equals method has to use AND operator instead of OR.
|
||||
* DATAES-155 - findAll(Iterable<ID> ids) doesn't set persistent entity id.
|
||||
|
||||
|
||||
Changes in version 1.3.0.M1 (2015-06-02)
|
||||
----------------------------------------
|
||||
* DATAES-168 - Release 1.3 M1 (Gosling).
|
||||
* DATAES-164 - CriteriaQuery equals method has to use AND operator instead of OR.
|
||||
* DATAES-162 - Adapt API changes in Spring Data Commons to simplify custom repository base class registration.
|
||||
* DATAES-159 - Bulk update with ElasticsearchTemplate.
|
||||
* DATAES-158 - UpdateRequest.script not working.
|
||||
* DATAES-157 - support deleteBy operation.
|
||||
* DATAES-155 - findAll(Iterable<ID> ids) doesn't set persistent entity id.
|
||||
|
||||
|
||||
Changes in version 1.2.0.RELEASE (2015-03-23)
|
||||
---------------------------------------------
|
||||
* DATAES-154 - Release 1.2 GA.
|
||||
|
||||
|
||||
Changes in version 1.2.0.RC1 (2015-03-05)
|
||||
-----------------------------------------
|
||||
* DATAES-152 - Release 1.2 RC1.
|
||||
* DATAES-151 - findAll(Iterable<ID> ids) uses id representation in source instead of ES id.
|
||||
* DATAES-140 - Document fields should not be indexed for search.
|
||||
* DATAES-135 - Add necessary implementation for improved multi-store behavior.
|
||||
* DATAES-132 - support include_in_parent for nested fieldtype.
|
||||
* DATAES-130 - Allow Spring EL usage in type attribute of @Document.
|
||||
* DATAES-129 - Custom Repository Method for simple geo request does not work.
|
||||
* DATAES-115 - FindBy projections for list returns only 10 results.
|
||||
* DATAES-100 - Allow configurable searchTimeout.
|
||||
* DATAES-94 - Bump to support ES 1.2.0.
|
||||
* DATAES-91 - Support for 'suggest' operations.
|
||||
|
||||
|
||||
Changes in version 1.1.2.RELEASE (2015-01-28)
|
||||
---------------------------------------------
|
||||
* DATAES-146 - Release 1.1.2.
|
||||
|
||||
|
||||
Changes in version 1.0.5.RELEASE (2015-01-27)
|
||||
---------------------------------------------
|
||||
* DATAES-145 - Release 1.0.5.
|
||||
|
||||
|
||||
Changes in version 1.2.0.M1 (2014-12-01)
|
||||
----------------------------------------
|
||||
* DATAES-134 - Release 1.2 M1.
|
||||
* DATAES-94 - Support for Elasticsearch 1.2.0.
|
||||
* DATAES-76 - Add support for mapping generation of inherited fields.
|
||||
|
||||
|
||||
Changes in version 1.1.1.RELEASE (2014-10-30)
|
||||
---------------------------------------------
|
||||
* DATAES-133 - Release 1.1.1.
|
||||
|
||||
|
||||
Changes in version 1.1.0.RELEASE (2014-09-05)
|
||||
---------------------------------------------
|
||||
* DATAES-128 - Release 1.1 GA.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Spring Data Elasticsearch 1.1 GA
|
||||
Copyright (c) [2013-2014] Pivotal Software, Inc.
|
||||
Spring Data Elasticsearch 1.1.4
|
||||
Copyright (c) [2013-2015] Pivotal Software, Inc.
|
||||
|
||||
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
||||
You may not use this product except in compliance with the License.
|
||||
|
||||
+24
-1
@@ -21,12 +21,16 @@ import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ApplicationContextAware;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchOperations;
|
||||
import org.springframework.data.elasticsearch.core.ElasticsearchTemplate;
|
||||
import org.springframework.data.elasticsearch.repositories.sample.SampleElasticsearchRepository;
|
||||
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
|
||||
import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
@@ -37,7 +41,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
public class EnableElasticsearchRepositoriesTests {
|
||||
public class EnableElasticsearchRepositoriesTests implements ApplicationContextAware {
|
||||
|
||||
ApplicationContext context;
|
||||
|
||||
@Override
|
||||
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
||||
this.context = applicationContext;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableElasticsearchRepositories(basePackages = "org.springframework.data.elasticsearch.repositories.sample")
|
||||
@@ -56,4 +67,16 @@ public class EnableElasticsearchRepositoriesTests {
|
||||
public void bootstrapsRepository() {
|
||||
assertThat(repository, is(notNullValue()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldScanSelectedPackage() {
|
||||
//given
|
||||
|
||||
//when
|
||||
String[] beanNamesForType = context.getBeanNamesForType(ElasticsearchRepository.class);
|
||||
|
||||
//then
|
||||
assertThat(beanNamesForType.length, is(1));
|
||||
assertThat(beanNamesForType[0], is("sampleElasticsearchRepository"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user