Spring Boot Batch with Oracle as JobRepository - oracle

I am searching for some good example of Spring Boot Batch where Oracle DB is used as Job Repository with Java Config.I have been able to run the batch with embedded DB.But while trying to use the Spring Batch Admin, am facing problems.
Thanks in Advance.

This is a good example of Spring Boot with Spring Batch Admin.
https://github.com/codecentric/spring-batch-admin-spring-boot
All you need to do is replace batch-hsql.properties with batch-oracle.properties and add
-Denvironment=oracle property to your server.

Related

custom update and delete queries in spring boot for postgresql

hi I am trying to update and delete the data in my application in spring boot and I came to know that postgresql is quite different from normal SQL can you provide the correct syntax for the update and delete operations in postgresql for spring boot application please I couldn't find it in internet.
If you use Spring Boot you actually could use Spring Data for creating queries and you'll not need to write queries by yourself.

Minimal and latest way of triggering batch job in the world of Spring Boot

I have setup a batch job with Spring Boot 1.5.8 and relevant Spring Batch and Integration starters. I want to kick off the job using incoming file using file poller.
I have used Spring Integration in old days to trigger batch job with file poller. Is this still stands same ? Does Spring Batch itself has this very basic functionality or do I have to have Spring Integration involved as well ?
Even if Spring Integration is needed, can anybody point to Annotation based sample application doing the same ?
Good questions. Let's answer each of them:
Is this still stands same ? Yes
Does Spring Batch itself has this very basic functionality or do I have to have Spring Integration involved as well ? No, you have to use Spring Integration
Even if Spring Integration is needed, can anybody point to Annotation based sample application doing the same ?
We are in the midst of updating all the Batch docs to include annotation as well as XML based configurations. Here is a doc that is in PR but will be merged in the next release that has the examples you are looking for:
https://github.com/cppwfs/spring-batch/blob/1f7cada52aba95bcb23d06bc034b21fe1de0a7a5/spring-batch-docs/asciidoc/spring-batch-integration.adoc#launching-batch-jobs-through-messages

Spring batch admin upgrade

I am working on a application to upgrade it to JAVA 8.
It is using spring integration, spring batch and spring batch admin.
For spring integration and spring batch to work on java 8, we have to upgrade it to latest spring integration which is 4.3.5 (this is what I'm trying to use) and spring batch to 3.0.7.
Problem I am facing is while upgrading SPRING BATCH ADMIN, which was last released in jan 2015 and internally it uses old spring integration version.
Wanted to ask- what are my options as application is very much depending on spring batch admin?
Is there any alternative for spring batch admin which can be used with spring integration 4.3.5 and spring batch 3.0.7.
Need advice and help regarding the same.
Note: I have read somewhere that I can use spring boot admin.
Please let me know if need more clarification on above question.
.
Spring Batch Admin project is deprecated. There won't be 2.0.0 release.
Spring Cloud Data Flow isn't direct alternative to Spring Batch Admin. It is about orchestration of processes in cloud environment while Spring Batch Admin is a dashboard for BATCH_ tables, though this functionality is present in Data Flow in its own way ))
UPDATE If you are in 2022, check this de.codecentric:batch-web-spring-boot-starter:
https://github.com/codecentric/spring-boot-starter-batch-web
https://blog.codecentric.de/batch-web-spring-boot-starter-2-0-1-released
https://mvnrepository.com/artifact/de.codecentric/batch-web-spring-boot-starter
This is a fork of spring-batch-admin that might be useful...
https://github.com/httpants/spring-batch-admin

Spring XD and Oracle RDBMS

I am newbie to Spring XD. I have a requirement to parse a file in a specific directory and push the output in oracle table.
Can I achieve that in Spring XD?
If not directly, can I create Spring boot/integration/batch application and deploy the same on Sprig XD?
Thanks,
Pratik
If I understood correctly, you want to deploy an ETL process on SpringXD.
Yes, this is possible, in fact, I once worked on that.
Spring Integration is ok with springXD and the things you should do is to adjust some parts of the context.
You can use task module in springXD to do ETL
Thanks for the inputs folks!
Well, I have learned Spring Batch framework and I am building the tasklets to manage my workflow to support my usecase.
Further, I am The resultant Jar of Spring Batch app to SpringXD as a Custom Module and scheduled it for a daily run.
I learnt from the research on this usecase that SpringXD is superset of and includes Spring Batch, Integration and Boot frameworks respectively; so
I kept the involvement of SpringXD as limited to Scheduling a batch job by adding custom module.
Thanks a lot for your support.
Cheers & Happy Architecting,
Pratik

How to use Flyway in Spring Boot with JDBC Security?

I would like to use Flyway as preferred way of database migration handling in my Spring Boot project (using current V1.2.1.RELEASE).
This is working fine so far however the integration with Spring Security using a JDBC DataSource seems to override the Flyway mechanism.
Following simple scenario:
Spring Boot 1.2.1
PostgreSQL 9.4.1
Flyway migration scripts for users, groups and authorities according to Spring Security documentation
Problem:
The Flyway migration scripts are not executed at startup as expected.
Maybe cause: It seems that Flyway is only executed at startup if the using Spring Boot project is also using JPA at least. Since Spring Security is based on plain JDBC, I've tried to temporary use the JDBC based database initialization scheme as described in Spring Boot docs (Chapter 68.3) which works, but (as documented) this way is like the 'poor man approach' and I'd really like to use Flyway also for these tables containing the User/Group/Authorities information.
Ok, after some further investigation I've found the problem:
Indeed, in a standard Spring Boot project the security context is initialized before any Flyway based migration takes place.
Normally this is not a big issue, but I've also used the AuthenticationManagerBuilder for creating a default admin user. This seems to be the wrong approach for creating such an initial user account.

Resources