How to use spring boot making a common library

前端 未结 2 1858
太阳男子
太阳男子 2020-12-23 04:41

Now I want to develop a common mail service for our systems. As we design, we want to develop a RabbitMQ producer and consumer. On consumer side, we could devel

相关标签:
2条回答
  • 2020-12-23 05:31

    Spring Lemon would be a good example for this. It uses Spring Boot, and is meant to be included in other Spring Boot applications. This is what we did to create it:

    1. Created a Spring Boot application, using the Spring Boot Starter Wizard of STS.
    2. Removed the generated application and test class.
    3. Removed spring-boot-maven-plugin, i.e. the build and the pluginRepositories sections in pom.xml. (See how a pom.xml would look without these sections).
    0 讨论(0)
  • 2020-12-23 05:40

    According to the documentation:

    Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".

    But Spring Boot is not the silver bullet which matches all situations. If you want to create a library, you can create a regular spring project which builds a jar and stores it in your company's repository, if you have one.

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