Skip to content

Tag: spring

Springboot property typemismatch

I have a common issue and none of all the other similar questions on the forum helped me sofar. Pls bear with me, im still learning. l have a Spring boot app. Unfortunately the first property that I declare doesn’t work due to type mismatch from String to int. The other works just fine. my application.p…

Spring Batch Wildcard ItemWriter

I have one dummy question. To explain my use-case, I have different type of DAOs; say Users, Beers… etc. I wanted to use one generic ItemWriter for all of them. I created a CommonComponentConfiguration where I defined; The writer class goes like this; So far everything is okay. Where things gets complic…

Spring cannot create UserService bean

Dao tier. I have abstract jpa dao interface, extended interface, and I added abstract implementation, from which I extend other real used implementations. These classes as follows: Service tier. Here I also have abstract service interface, one extended interface (UserService) and its abstract and real impleme…

Spring Boot merge configuration properties

I’ve a use case where I need to bind configuration properties based on two prefixes, one of which is determined at runtime. Let’s say the constant prefix is foo and the runtime prefix is bar. Given a new instance of Java Bean class FooBar, the code should bind all environment variables FOO_, then …

Spring Boot @Schedular not running after first execution

I have written this scheduled task in my SpringBoot app: This runs first time, but not subsequently. Answer It turned out that I was running another “heavy” scheduled task in the same application (it was initially created for testing my business logic and then I forgot to remove that). When I remo…