com.github.spt-oss:spring-boot-starter-data-jest

Custom implementation for Spring Data Jest

Лицензия

Лицензия

Категории

Категории

Spring Boot Контейнер Микросервисы Данные Jest Базы данных
Группа

Группа

com.github.spt-oss
Идентификатор

Идентификатор

spring-boot-starter-data-jest
Последняя версия

Последняя версия

3.1.5.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

Custom implementation for Spring Data Jest
Организация-разработчик

Организация-разработчик

SPT
Система контроля версий

Система контроля версий

https://github.com/spt-oss/spring-data-jest-plus/tree/master/spring-boot-starter-data-jest

Скачать spring-boot-starter-data-jest

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.spt-oss/spring-boot-starter-data-jest/ -->
<dependency>
    <groupId>com.github.spt-oss</groupId>
    <artifactId>spring-boot-starter-data-jest</artifactId>
    <version>3.1.5.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.spt-oss/spring-boot-starter-data-jest/
implementation 'com.github.spt-oss:spring-boot-starter-data-jest:3.1.5.0'
// https://jarcasting.com/artifacts/com.github.spt-oss/spring-boot-starter-data-jest/
implementation ("com.github.spt-oss:spring-boot-starter-data-jest:3.1.5.0")
'com.github.spt-oss:spring-boot-starter-data-jest:jar:3.1.5.0'
<dependency org="com.github.spt-oss" name="spring-boot-starter-data-jest" rev="3.1.5.0">
  <artifact name="spring-boot-starter-data-jest" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.spt-oss', module='spring-boot-starter-data-jest', version='3.1.5.0')
)
libraryDependencies += "com.github.spt-oss" % "spring-boot-starter-data-jest" % "3.1.5.0"
[com.github.spt-oss/spring-boot-starter-data-jest "3.1.5.0"]

Зависимости

compile (11)

Идентификатор библиотеки Тип Версия
vc.inreach.aws : aws-signing-request-interceptor jar 0.0.22
commons-codec : commons-codec jar 1.11
org.elasticsearch.client : transport jar 5.6.12
com.fasterxml.jackson.dataformat : jackson-dataformat-smile jar 2.9.7
com.fasterxml.jackson.dataformat : jackson-dataformat-yaml jar 2.9.7
com.fasterxml.jackson.dataformat : jackson-dataformat-cbor jar 2.9.7
org.yaml : snakeyaml jar 1.19
com.github.vanroy : spring-boot-starter-data-jest jar 3.1.5.RELEASE
org.springframework.boot : spring-boot-starter-json jar 2.0.6.RELEASE
org.springframework.cloud : spring-cloud-aws-autoconfigure jar 2.0.1.RELEASE
org.springframework.data : spring-data-elasticsearch jar 3.0.11.RELEASE

provided (1)

Идентификатор библиотеки Тип Версия
org.projectlombok : lombok jar 1.18.4

test (1)

Идентификатор библиотеки Тип Версия
org.springframework.boot : spring-boot-starter-test jar 2.0.6.RELEASE

Модули Проекта

Данный проект не имеет модулей.

Spring Data Jest Plus

circleci maven central javadoc

  • Custom implementation for Spring Data Jest
  • Note: This project is unofficial and experimental.

Dependencies

  • com.github.spt-oss:spring-boot-starter-data-jest:3.1.5.0
    • com.github.vanroy:spring-boot-starter-data-jest:3.1.5.RELEASE
    • vc.inreach.aws:aws-signing-request-interceptor:0.0.22
    • org.elasticsearch:elasticsearch:5.6.12
    • org.springframework.boot:spring-boot-starter-json:2.0.6.RELEASE
    • org.springframework.cloud:spring-cloud-aws-autoconfigure:2.0.1.RELEASE
    • org.springframework.data:spring-data-elasticsearch:3.0.11.RELEASE
    • ......
  • com.github.spt-oss:spring-boot-starter-data-jest:3.1.5.1
    • org.elasticsearch:elasticsearch:5.6.14
    • org.springframework.boot:spring-boot-starter-json:2.0.7.RELEASE
    • org.springframework.data:spring-data-elasticsearch:3.0.12.RELEASE
    • ......

Usage

Use with Spring Boot and Amazon Elasticsearch Service

  1. Add a dependency in your project.

    <dependency>
        <groupId>com.github.spt-oss</groupId>
        <artifactId>spring-boot-starter-data-jest</artifactId>
        <version>3.1.5.1</version>
    </dependency>
  2. Add AWS settings to your application properties.

    spring.data.jest:
        uri: https://search-XXXXX-XXXXX.us-west-1.es.amazonaws.com/
    
    cloud.aws:
        credentials:
            accessKey: ABCDEFGHIJKLMNOPQRST
            secretKey: ABc1d2EfGhIjkLMnOpqRS3+tuVwXYzabCDeFGh4i
        region:
            auto: false
            static: us-west-1
  3. Setup Document and Repository for your project.

    import org.springframework.data.annotation.Id;
    import org.springframework.data.elasticsearch.annotations.Document;
    import org.springframework.data.elasticsearch.annotations.Mapping;
    import org.springframework.data.elasticsearch.annotations.Setting;
    
    import lombok.Data;
    
    @Document(indexName = "foo", type = "product", createIndex = false)
    @Setting(settingPath = "/path/to/settings.json")
    @Mapping(mappingPath = "/path/to/mappings/product.json")
    @Data
    public class Product {
        
        @Id
        private String id;
        
        private String content;
    }
    import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
    import org.springframework.stereotype.Repository;
    
    @Repository
    public interface ProductRepository extends ElasticsearchRepository<Product, String> {
    }
  4. Setup Elasticsearch Configuration.

    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;
    import org.springframework.data.elasticsearch.repository.config.EnableElasticsearchRepositories;
    import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
    
    import com.fasterxml.jackson.databind.PropertyNamingStrategy;
    import com.github.vanroy.springboot.autoconfigure.data.jest.CustomElasticsearchJestDataAutoConfiguration.JestObjectMapperCustomizer;
    
    @Configuration
    @EnableElasticsearchRepositories(basePackageClasses = ProductRepository.class)
    public class MyElasticsearchConfiguration {
        
        @Bean
        public JestObjectMapperCustomizer jestObjectMapperCustomizer() {
            
            return mapper -> mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
        }
    }
  5. Run the application.

License

  • This software is released under the Apache License 2.0.
com.github.spt-oss

SPT

Open Source Libraries for Java

Версии библиотеки

Версия
3.1.5.0