0

I would like to use a Java Spring-boot application as an API dependency for others non-Spring-boot Scala / Java applications.

From my understanding, this is possible.

I should be able to build a dependency JAR module with all my annotated beans, and import it in my main application. Then, to be able to use this dependency JAR, I think I will just have to convert my main application to a Spring boot application, adding annotation @SpringBootApplication to main class, and adding code "SpringApplication.run(Application.class, args))" in main().

I'm wondering about the practicality of this project, more specifically :

  1. Would it indeed be possible to directly use the @Configuration class of my dependency (or will I be forced to recreate a new class in main application) ?
  2. Would it be possible to import / use the Spring boot dependency without having to modify the main class of my main application (convert it to a Spring boot application) ? This is a bit of an issue for me, because I would like to use this API in the most easy way.
Azzip
  • 122
  • 10
  • Why a spring boot application itself as dependency not the possible REST Api ? – khmarbaise Jan 13 '18 at 14:14
  • REST Api is no good in my use case. The API is supposed to be used by multiple applications, handle large amounts of data, and be async. – Azzip Jan 13 '18 at 14:26

0 Answers0