Merge pull request #8922 from dupirefr/team/JAVA-958-standardize_packages_in_spring_batch_module

[JAVA-958] Standardize packages in spring batch module
This commit is contained in:
Josh Cummings 2020-03-24 22:46:02 -06:00 committed by GitHub
commit 94c95c9016
55 changed files with 114 additions and 110 deletions

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;

Binary file not shown.

View File

@ -1,4 +1,4 @@
package org.baeldung.batch;
package com.baeldung.batch;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,12 +1,12 @@
package org.baeldung.batch;
package com.baeldung.batch;
import org.baeldung.batch.model.Transaction;
import org.baeldung.batch.service.CustomItemProcessor;
import org.baeldung.batch.service.CustomSkipPolicy;
import org.baeldung.batch.service.MissingUsernameException;
import org.baeldung.batch.service.NegativeAmountException;
import org.baeldung.batch.service.RecordFieldSetMapper;
import org.baeldung.batch.service.SkippingItemProcessor;
import com.baeldung.batch.model.Transaction;
import com.baeldung.batch.service.CustomItemProcessor;
import com.baeldung.batch.service.CustomSkipPolicy;
import com.baeldung.batch.service.MissingUsernameException;
import com.baeldung.batch.service.NegativeAmountException;
import com.baeldung.batch.service.RecordFieldSetMapper;
import com.baeldung.batch.service.SkippingItemProcessor;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.JobBuilderFactory;

View File

@ -1,12 +1,12 @@
package org.baeldung.batch;
package com.baeldung.batch;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.baeldung.batch.model.Transaction;
import org.baeldung.batch.service.RecordFieldSetMapper;
import org.baeldung.batch.service.RetryItemProcessor;
import com.baeldung.batch.model.Transaction;
import com.baeldung.batch.service.RecordFieldSetMapper;
import com.baeldung.batch.service.RetryItemProcessor;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;

View File

@ -1,4 +1,4 @@
package org.baeldung.batch;
package com.baeldung.batch;
import java.net.MalformedURLException;

View File

@ -1,6 +1,6 @@
package org.baeldung.batch.model;
package com.baeldung.batch.model;
import org.baeldung.batch.service.adapter.LocalDateTimeAdapter;
import com.baeldung.batch.service.adapter.LocalDateTimeAdapter;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.baeldung.batch.partitioner;
package com.baeldung.batch.partitioner;
import java.util.HashMap;
import java.util.Map;

View File

@ -1,7 +1,7 @@
package org.baeldung.batch.partitioner;
package com.baeldung.batch.partitioner;
import org.baeldung.batch.model.Transaction;
import org.baeldung.batch.service.RecordFieldSetMapper;
import com.baeldung.batch.model.Transaction;
import com.baeldung.batch.service.RecordFieldSetMapper;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;

View File

@ -1,4 +1,4 @@
package org.baeldung.batch.partitioner;
package com.baeldung.batch.partitioner;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,6 +1,6 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
import org.baeldung.batch.model.Transaction;
import com.baeldung.batch.model.Transaction;
import org.springframework.batch.item.ItemProcessor;
public class CustomItemProcessor implements ItemProcessor<Transaction, Transaction> {

View File

@ -1,4 +1,4 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
import org.springframework.batch.core.step.skip.SkipLimitExceededException;
import org.springframework.batch.core.step.skip.SkipPolicy;

View File

@ -1,4 +1,4 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
public class MissingUsernameException extends RuntimeException {
}

View File

@ -1,4 +1,4 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
public class NegativeAmountException extends RuntimeException {

View File

@ -1,6 +1,6 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
import org.baeldung.batch.model.Transaction;
import com.baeldung.batch.model.Transaction;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;

View File

@ -1,10 +1,10 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.util.EntityUtils;
import org.baeldung.batch.model.Transaction;
import com.baeldung.batch.model.Transaction;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
import org.slf4j.Logger;

View File

@ -1,6 +1,6 @@
package org.baeldung.batch.service;
package com.baeldung.batch.service;
import org.baeldung.batch.model.Transaction;
import com.baeldung.batch.model.Transaction;
import org.springframework.batch.item.ItemProcessor;
public class SkippingItemProcessor implements ItemProcessor<Transaction, Transaction> {

View File

@ -1,4 +1,4 @@
package org.baeldung.batch.service.adapter;
package com.baeldung.batch.service.adapter;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.time.LocalDateTime;

View File

@ -1,4 +1,4 @@
package org.baeldung.batchscheduler;
package com.baeldung.batchscheduler;
import java.util.Date;
import java.util.IdentityHashMap;
@ -7,7 +7,7 @@ import java.util.Map;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import org.baeldung.batchscheduler.model.Book;
import com.baeldung.batchscheduler.model.Book;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.Job;

View File

@ -1,4 +1,4 @@
package org.baeldung.batchscheduler.model;
package com.baeldung.batchscheduler.model;
public class Book {
private int id;

View File

@ -1,4 +1,4 @@
package org.baeldung.batchtesting;
package com.baeldung.batchtesting;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.JobParametersBuilder;

View File

@ -1,13 +1,13 @@
package org.baeldung.batchtesting;
package com.baeldung.batchtesting;
import java.io.IOException;
import org.baeldung.batchtesting.model.Book;
import org.baeldung.batchtesting.model.BookDetails;
import org.baeldung.batchtesting.model.BookRecord;
import org.baeldung.batchtesting.service.BookDetailsItemProcessor;
import org.baeldung.batchtesting.service.BookItemProcessor;
import org.baeldung.batchtesting.service.BookRecordFieldSetMapper;
import com.baeldung.batchtesting.model.Book;
import com.baeldung.batchtesting.model.BookDetails;
import com.baeldung.batchtesting.model.BookRecord;
import com.baeldung.batchtesting.service.BookDetailsItemProcessor;
import com.baeldung.batchtesting.service.BookItemProcessor;
import com.baeldung.batchtesting.service.BookRecordFieldSetMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.Job;

View File

@ -1,4 +1,4 @@
package org.baeldung.batchtesting.model;
package com.baeldung.batchtesting.model;
public class Book {

View File

@ -1,4 +1,4 @@
package org.baeldung.batchtesting.model;
package com.baeldung.batchtesting.model;
public class BookDetails {

View File

@ -1,4 +1,4 @@
package org.baeldung.batchtesting.model;
package com.baeldung.batchtesting.model;
public class BookRecord {

View File

@ -1,7 +1,7 @@
package org.baeldung.batchtesting.service;
package com.baeldung.batchtesting.service;
import org.baeldung.batchtesting.model.BookDetails;
import org.baeldung.batchtesting.model.BookRecord;
import com.baeldung.batchtesting.model.BookDetails;
import com.baeldung.batchtesting.model.BookRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;

View File

@ -1,7 +1,7 @@
package org.baeldung.batchtesting.service;
package com.baeldung.batchtesting.service;
import org.baeldung.batchtesting.model.Book;
import org.baeldung.batchtesting.model.BookRecord;
import com.baeldung.batchtesting.model.Book;
import com.baeldung.batchtesting.model.BookRecord;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.item.ItemProcessor;

View File

@ -1,6 +1,6 @@
package org.baeldung.batchtesting.service;
package com.baeldung.batchtesting.service;
import org.baeldung.batchtesting.model.BookRecord;
import com.baeldung.batchtesting.model.BookRecord;
import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;

View File

@ -1,6 +1,6 @@
package org.baeldung.taskletsvschunks.chunks;
package com.baeldung.taskletsvschunks.chunks;
import org.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.model.Line;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,7 +1,7 @@
package org.baeldung.taskletsvschunks.chunks;
package com.baeldung.taskletsvschunks.chunks;
import org.baeldung.taskletsvschunks.model.Line;
import org.baeldung.taskletsvschunks.utils.FileUtils;
import com.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.utils.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,7 +1,7 @@
package org.baeldung.taskletsvschunks.chunks;
package com.baeldung.taskletsvschunks.chunks;
import org.baeldung.taskletsvschunks.model.Line;
import org.baeldung.taskletsvschunks.utils.FileUtils;
import com.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.utils.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,9 +1,9 @@
package org.baeldung.taskletsvschunks.config;
package com.baeldung.taskletsvschunks.config;
import org.baeldung.taskletsvschunks.chunks.LineProcessor;
import org.baeldung.taskletsvschunks.chunks.LineReader;
import org.baeldung.taskletsvschunks.chunks.LinesWriter;
import org.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.chunks.LineProcessor;
import com.baeldung.taskletsvschunks.chunks.LineReader;
import com.baeldung.taskletsvschunks.chunks.LinesWriter;
import com.baeldung.taskletsvschunks.model.Line;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;

View File

@ -1,8 +1,8 @@
package org.baeldung.taskletsvschunks.config;
package com.baeldung.taskletsvschunks.config;
import org.baeldung.taskletsvschunks.tasklets.LinesProcessor;
import org.baeldung.taskletsvschunks.tasklets.LinesReader;
import org.baeldung.taskletsvschunks.tasklets.LinesWriter;
import com.baeldung.taskletsvschunks.tasklets.LinesProcessor;
import com.baeldung.taskletsvschunks.tasklets.LinesReader;
import com.baeldung.taskletsvschunks.tasklets.LinesWriter;
import org.springframework.batch.core.Job;
import org.springframework.batch.core.Step;
import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;

View File

@ -1,4 +1,4 @@
package org.baeldung.taskletsvschunks.model;
package com.baeldung.taskletsvschunks.model;
import java.io.Serializable;
import java.time.LocalDate;

View File

@ -1,6 +1,6 @@
package org.baeldung.taskletsvschunks.tasklets;
package com.baeldung.taskletsvschunks.tasklets;
import org.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.model.Line;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,7 +1,7 @@
package org.baeldung.taskletsvschunks.tasklets;
package com.baeldung.taskletsvschunks.tasklets;
import org.baeldung.taskletsvschunks.model.Line;
import org.baeldung.taskletsvschunks.utils.FileUtils;
import com.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.utils.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,7 +1,7 @@
package org.baeldung.taskletsvschunks.tasklets;
package com.baeldung.taskletsvschunks.tasklets;
import org.baeldung.taskletsvschunks.model.Line;
import org.baeldung.taskletsvschunks.utils.FileUtils;
import com.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.utils.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.ExitStatus;

View File

@ -1,8 +1,8 @@
package org.baeldung.taskletsvschunks.utils;
package com.baeldung.taskletsvschunks.utils;
import com.opencsv.CSVReader;
import com.opencsv.CSVWriter;
import org.baeldung.taskletsvschunks.model.Line;
import com.baeldung.taskletsvschunks.model.Line;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -8,15 +8,15 @@
</layout>
</appender>
<logger name="org.baeldung.taskletsvschunks" level="debug" additivity="false">
<logger name="com.baeldung.taskletsvschunks" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.baeldung.batchscheduler" level="debug" additivity="false">
<logger name="com.baeldung.batchscheduler" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
<logger name="org.baeldung.batchtesting" level="debug" additivity="false">
<logger name="com.baeldung.batchtesting" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
</logger>

View File

@ -22,14 +22,14 @@
</property>
<property name="fieldSetMapper">
<bean
class="org.baeldung.batch.service.RecordFieldSetMapper" />
class="com.baeldung.batch.service.RecordFieldSetMapper" />
</property>
</bean>
</property>
<property name="linesToSkip" value="1" />
</bean>
<bean id="itemProcessor" class="org.baeldung.batch.service.CustomItemProcessor" />
<bean id="itemProcessor" class="com.baeldung.batch.service.CustomItemProcessor" />
<bean id="itemWriter" class="org.springframework.batch.item.xml.StaxEventItemWriter">
<property name="resource" value="file:xml/output.xml" />
@ -40,7 +40,7 @@
<bean id="recordMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>org.baeldung.batch.model.Transaction</value>
<value>com.baeldung.batch.model.Transaction</value>
</list>
</property>
</bean>

View File

@ -1,6 +1,6 @@
package org.baeldung;
package com.baeldung;
import org.baeldung.batch.App;
import com.baeldung.batch.App;
import org.junit.Test;
public class SpringContextTest {

View File

@ -1,5 +1,6 @@
package org.baeldung.batch;
package com.baeldung.batch;
import com.baeldung.batch.SpringBatchRetryConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.entity.StringEntity;

View File

@ -1,5 +1,6 @@
package org.baeldung.batchscheduler;
package com.baeldung.batchscheduler;
import com.baeldung.batchscheduler.SpringBatchScheduler;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,10 +1,11 @@
package org.baeldung.batchtesting;
package com.baeldung.batchtesting;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import java.util.Collection;
import com.baeldung.batchtesting.SpringBatchConfiguration;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,12 +1,13 @@
package org.baeldung.batchtesting;
package com.baeldung.batchtesting;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import java.util.Arrays;
import org.baeldung.batchtesting.model.Book;
import org.baeldung.batchtesting.model.BookRecord;
import com.baeldung.batchtesting.SpringBatchConfiguration;
import com.baeldung.batchtesting.model.Book;
import com.baeldung.batchtesting.model.BookRecord;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,6 +1,6 @@
package org.baeldung.taskletsvschunks.chunks;
package com.baeldung.taskletsvschunks.chunks;
import org.baeldung.taskletsvschunks.config.ChunksConfig;
import com.baeldung.taskletsvschunks.config.ChunksConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1,6 +1,6 @@
package org.baeldung.taskletsvschunks.tasklets;
package com.baeldung.taskletsvschunks.tasklets;
import org.baeldung.taskletsvschunks.config.TaskletsConfig;
import com.baeldung.taskletsvschunks.config.TaskletsConfig;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

View File

@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><transactionRecord><transactionRecord><age>10</age><amount>10000.0</amount><postCode>430222</postCode><transactionDate>2015-10-31 00:00:00</transactionDate><userId>1234</userId><username>sammy</username></transactionRecord><transactionRecord><age>10</age><amount>12321.0</amount><postCode>430222</postCode><transactionDate>2015-12-03 00:00:00</transactionDate><userId>9999</userId><username>john</username></transactionRecord></transactionRecord>
<?xml version="1.0" encoding="UTF-8"?><transactionRecord></transactionRecord>

View File

@ -1,4 +1,4 @@
package org.baeldung;
package com.baeldung;
import org.junit.Test;