I am trying to create my own instance of spring initializr as described in https://docs.spring.io/initializr/docs/current/reference/html/#create-instance. My need is to add custom java classes in the generated project (Other than the default @SpringBootApplication class). I am not able to figure out how to do that. Not finding any examples anywhere as well. If someone can guide me on how to do that would be helpful.
Asked
Active
Viewed 596 times
0
-
If your custom classes could be located through some artifact on Maven Central Repository, you can add them manually (example is on [same tutorial page](https://docs.spring.io/initializr/docs/current/reference/html/#create-instance-dependencies)). Otherwise they should be added manually to generated Maven pom.xml – Nikolai Shevchenko Feb 16 '21 at 09:26
-
@NikolaiShevchenko thanks. Can you please specify the section # for the example you are referring to? Just to clarify, I need to add lets say my own CustomJavaClass.java file in the generated folder structure. This class is not a third party library class but my own custom one – Vishal Feb 16 '21 at 09:33
-
`#create-instance-dependencies` – Nikolai Shevchenko Feb 16 '21 at 10:00