File tree Expand file tree Collapse file tree
main/java/zin/rashidi/boot/batch/user
test/java/zin/rashidi/boot/batch/user Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,9 +20,10 @@ repositories {
2020dependencies {
2121 implementation(" org.springframework.boot:spring-boot-starter-batch" )
2222 implementation(" org.springframework.boot:spring-boot-starter-data-jdbc" )
23- implementation(" tools.jackson.core:jackson-databind " )
23+ implementation(" org.springframework.boot:spring-boot-starter-jackson " )
2424 runtimeOnly(" com.mysql:mysql-connector-j" )
2525 testImplementation(" org.springframework.boot:spring-boot-starter-test" )
26+ testImplementation(" org.springframework.boot:spring-boot-starter-jackson-test" )
2627 testImplementation(" org.springframework.boot:spring-boot-testcontainers" )
2728 testImplementation(" org.springframework.batch:spring-batch-test" )
2829 testImplementation(" org.testcontainers:testcontainers-junit-jupiter" )
Original file line number Diff line number Diff line change 1515import org .springframework .context .annotation .Configuration ;
1616import org .springframework .core .io .ClassPathResource ;
1717import org .springframework .transaction .PlatformTransactionManager ;
18- import tools .jackson .databind .json .JsonMapper ;
1918
2019import javax .sql .DataSource ;
2120
2524@ Configuration
2625class UserJobConfiguration {
2726
28- private static final JsonMapper OBJECT_MAPPER = new JsonMapper ();
29-
3027 private JsonItemReader <UserFile > reader () {
3128 JacksonJsonObjectReader <UserFile > reader = new JacksonJsonObjectReader <>(UserFile .class );
3229
33- reader .setMapper (OBJECT_MAPPER );
34-
3530 return new JsonItemReaderBuilder <UserFile >()
3631 .jsonObjectReader (reader )
3732 .name ("userReader" )
Original file line number Diff line number Diff line change @@ -114,7 +114,6 @@ void truncateUsers() {
114114 @ TestConfiguration
115115 static class BatchTestConfiguration extends DefaultBatchConfiguration {
116116
117- @ Override
118117 @ Bean
119118 protected DataSource getDataSource () {
120119 return DataSourceBuilder .create ()
You can’t perform that action at this time.
0 commit comments