Skip to content

Instantly share code, notes, and snippets.

package com.tcb.issue1.repository;
import com.tcb.issue1.model.Offer;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/**
* This class is a repository for the offer object model. It abstract the data access by providing default methods to
* access data.
*
package com.tcb.issue1.repository;
import com.tcb.issue1.model.Car;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;
/**
* This class is a repository for the car object model. It abstract the data access by providing default methods to
* access data.
*
package com.tcb.issue1.model;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
/**
@theflofly
theflofly / Car.java
Last active February 14, 2016 21:54
package com.tcb.issue1.model;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
/**
* This class represents a car.
spring:
batch:
job:
enabled: false
data:
elasticsearch:
clusterName: adm-cluster
clusterNodes: localhost:9300
#local: true
properties:
package com.tcb.issue1.configuration;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource;
<?xml version="1.0" encoding="UTF-8"?>
<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>com.tcb.issue1</groupId>
<artifactId>Issue1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>