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
<?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> |
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
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; |
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
spring: | |
batch: | |
job: | |
enabled: false | |
data: | |
elasticsearch: | |
clusterName: adm-cluster | |
clusterNodes: localhost:9300 | |
#local: true | |
properties: |
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
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. |
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
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 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
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. | |
* |
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
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. | |
* |
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
package com.tcb.issue1.job; | |
import com.tcb.issue1.model.Car; | |
import com.tcb.issue1.repository.CarRepository; | |
import org.springframework.batch.item.data.AbstractPaginatedDataItemReader; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.data.domain.Page; | |
import org.springframework.data.domain.PageRequest; |
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
package com.tcb.issue1.job; | |
import com.tcb.issue1.model.Car; | |
import com.tcb.issue1.model.Offer; | |
import org.slf4j.Logger; | |
import org.springframework.batch.item.ItemProcessor; | |
import static org.slf4j.LoggerFactory.getLogger; | |
/** |
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
package com.tcb.issue1.job; | |
import com.tcb.issue1.model.Offer; | |
import com.tcb.issue1.repository.OfferRepository; | |
import org.springframework.batch.item.ItemWriter; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import java.util.List; |
OlderNewer