Moved Flat File Autoconfigs, props and tests to the flatfile package

This commit is contained in:
Glenn Renfro
2020-08-07 10:20:52 -04:00
committed by Michael Minella
parent 7c23c31f48
commit 7223f60ee7
8 changed files with 50 additions and 47 deletions

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.util.Map;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.util.ArrayList;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.util.ArrayList;
import java.util.List;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.util.Locale;

View File

@@ -7,13 +7,13 @@
},
{
"name": "spring.batch.job.flatfilereader",
"type": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"type": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilewriter",
"type": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"type": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
}
],
"properties": [
@@ -25,194 +25,194 @@
{
"name": "spring.batch.job.flatfilereader.comments",
"type": "java.util.List<java.lang.String>",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.current-item-count",
"type": "java.lang.Integer",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": 0
},
{
"name": "spring.batch.job.flatfilereader.delimited",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilereader.delimiter",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.encoding",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.fixed-length",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilereader.included-fields",
"type": "java.util.List<java.lang.Integer>",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.lines-to-skip",
"type": "java.lang.Integer",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": 0
},
{
"name": "spring.batch.job.flatfilereader.max-item-count",
"type": "java.lang.Integer",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.name",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.names",
"type": "java.lang.String[]",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.parsing-strict",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": true
},
{
"name": "spring.batch.job.flatfilereader.quote-character",
"type": "java.lang.Character",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.ranges",
"type": "java.util.List<org.springframework.batch.item.file.transform.Range>",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.resource",
"type": "org.springframework.core.io.Resource",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties"
},
{
"name": "spring.batch.job.flatfilereader.save-state",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": true
},
{
"name": "spring.batch.job.flatfilereader.strict",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderProperties",
"defaultValue": true
},
{
"name": "spring.batch.job.flatfilewriter.append",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilewriter.delimited",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilewriter.delimiter",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": ","
},
{
"name": "spring.batch.job.flatfilewriter.encoding",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.force-sync",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilewriter.format",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.formatted",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilewriter.line-separator",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.locale",
"type": "java.util.Locale",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.maximum-length",
"type": "java.lang.Integer",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": 0
},
{
"name": "spring.batch.job.flatfilewriter.minimum-length",
"type": "java.lang.Integer",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": 0
},
{
"name": "spring.batch.job.flatfilewriter.name",
"type": "java.lang.String",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.names",
"type": "java.lang.String[]",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.resource",
"type": "org.springframework.core.io.Resource",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.flatfilewriter.save-state",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": true
},
{
"name": "spring.batch.job.flatfilewriter.should-delete-if-empty",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": false
},
{
"name": "spring.batch.job.flatfilewriter.should-delete-if-exists",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties",
"defaultValue": true
},
{
"name": "spring.batch.job.flatfilewriter.transactional",
"type": "java.lang.Boolean",
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterProperties"
"sourceType": "org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterProperties"
},
{
"name": "spring.batch.job.job-name",

View File

@@ -1,6 +1,6 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.springframework.cloud.task.batch.autoconfigure.FlatFileItemReaderAutoConfiguration,\
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemReaderAutoConfiguration,\
org.springframework.cloud.task.batch.autoconfigure.RangeConverter,\
org.springframework.cloud.task.batch.autoconfigure.SingleStepJobAutoConfiguration,\
org.springframework.cloud.task.batch.autoconfigure.FlatFileItemWriterAutoConfiguration, \
org.springframework.cloud.task.batch.autoconfigure.flatfile.FlatFileItemWriterAutoConfiguration, \
org.springframework.cloud.task.batch.autoconfigure.jdbc.JdbcItemWriterAutoConfiguration, \
org.springframework.cloud.task.batch.autoconfigure.jdbc.JdbcCursorItemReaderAutoConfiguration

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.util.ArrayList;
import java.util.HashMap;
@@ -44,6 +44,8 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.cloud.task.batch.autoconfigure.RangeConverter;
import org.springframework.cloud.task.batch.autoconfigure.SingleStepJobAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

View File

@@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.cloud.task.batch.autoconfigure;
package org.springframework.cloud.task.batch.autoconfigure.flatfile;
import java.io.File;
import java.io.InputStreamReader;
@@ -45,6 +45,7 @@ import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration;
import org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
import org.springframework.cloud.task.batch.autoconfigure.SingleStepJobAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;