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

前端 未结 1 456
梦谈多话
梦谈多话 2020-12-22 06:28

I am trying to have Spring Batch Admin UI using spring-batch-admin-samples project.

My job uses Spring Boot and I have changed my main application class to be deploy

1条回答
  •  生来不讨喜
    2020-12-22 07:06

    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.

    0 讨论(0)
提交回复
热议问题