Spring Batch Admin + Spring Boot - Ambiguous mapping. Cannot map 'org.springframework.batch.admin.web.JobController#1' method

瘦欲@ 提交于 2019-11-29 18:14:56

After few days of hit and trial, I am able to get that Sample Github project working for my job. Two root causes,

1.@Configuration & @SpringBootApplication being in same package for my job: My context was getting initialized twice because I had both classes in same package so I had to move configuration class to a different package than main class.

2.Spring Boot Version: Sample project is coded in Spring Boot Version 1.2.2.RELEASE while My job was using 1.4.0.RELEASE and that was causing objectMapper issues. Project worked with 1.2.2.RELEASE and also with latest version, 1.5.2.RELEASE so I upgraded myself to 1.5.2.RELEASE.

I faced various other issues with,

  • JNDI data source Use

  • App Context Path Change

  • Launching Job via a Spring Scheduler

  • Logback Logging

  • Reading Non - Standard Boot Properties

and my deployment environment was Weblogic and RDBMS being DB2. I was able to solve all these issues mostly my overriding XMLs of spring-batch-admin-manager API.

Hope this helps to anybody going to use that sample project as starting point.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!