0

Im currently starting to develop a new project for my masters final thesis which will be a monolith to microservice kinda project ( very briefly ).

Since my team already has a defined architecture for all the backend applications ( they are currently monoliths ), is there a way I can "quickly" create a generator with the already defined architecture for the new microservices?

In can this cannot be possible, Im thinking on just creating a blank base project that woud be the starting point for any microservice in the team.

Hugo Vinhal
  • 305
  • 1
  • 15

3 Answers3

2

If I understand your need correctly I think you need a tool to bootstrap your project according to your own architectural design. To do that, personally I use Telosys (https://www.telosys.org/). I use it to bootstrap my microservices projects (with SpringBoot + Kubernetes).

If you just need a very basic project initializer of course you can use "Spring Initializr", but if you need to go further a tool like Telosys is more powerfull to generate all your basic classes (Domain, REST controllers, repositories, etc).

It allows to customize your code generation templates in order to obtain exactly what you want. You can use it as a "command line" tool (Telosys-CLI) or with Eclipse (Telosys plugin). For more information, see the doc : https://doc.telosys.org/ or this video : https://www.youtube.com/watch?v=nMEZ4tz-E4k

rlopez
  • 655
  • 7
  • 15
0

I would say the solution will depend on what is your "blank base project" structure. I can think of two possibilities that might fit your requirements.

If you only need to configure certain aspects of the project, such as its Maven coordinates, build tool, java version and Spring Boot Starters dependencies, then you don't need a base project at all. Spring Initializr project is made for you. Spring Initializr is a popular service and even a library that you can use and extend for your own needs.

You can customize the Spring Initializr service for your own needs, however It isn’t a straightforward path. You can see how to create your own service here.

I also have created my custom one following the same guide. I used a copy of the official service application.yml, I added my custom starters and implemented my own InitializrMetadataUpdateStrategy to exclude Spring snapshots.

If you are using Maven then you could create a Maven archetype, I think it will be easier than dealing with Spring Initializr customization.

A Maven archetype is an abstraction of a kind of a project that can be instantiated into a concrete customized Maven project. In short, it's a template project template from which other projects are created.

This guide will teach you how to create a custom archetype and then how to use it to generate a Maven project through the maven-archetype-plugin.

eHayik
  • 2,981
  • 1
  • 21
  • 33
  • What I am currently looking is an easy way o setup a new project/microservice for the team. Since this isnt the main focus of the thess project I am looking for the fastest but also a good solution. I will give it a go with the archetypes, since I actually have eard about it before and we use Maven. – Hugo Vinhal Sep 19 '21 at 17:18
  • Thanks for your feedback, I hope my answer is useful for you, if so please either mark it as correct or give it a vote up in order to reach more people with the same problem – eHayik Sep 20 '21 at 19:17
0

currently I've been building this tool for developer not only be able to generate Spring boot project but also designing the spring component such as Service, entity, repository, ect. Check this out https://www.codern.io/

HGreg
  • 31
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/34498507) – dpapadopoulos Jun 07 '23 at 15:13