Home > Back-end >  How to import spring boot project as module of maven project in an eclipse?
How to import spring boot project as module of maven project in an eclipse?

Time:08-20

I have started learning spring boot. I am studying spring boot security now. I have created one maven project and one spring boot project. Basically I want to use spring boot project as a module of maven project.

I tried to add module inside pom.xml of maven project and unzipped spring boot project created using spring boot initilizr inside maven project directory. In eclipse it shows folder structure instead of packages.

Can anybody guide me with this. Some step by step procedure on using maven project with spring boot project as a module would be greatly appreciated.

Thank you for your understanding and support.

CodePudding user response:

Spring Initializer

  1. What I understood from your question that you need to create a sprigboot maven project right? If so then you need to go to start.spring.io and choose maven project and that it! You can import that to that file as maven project to you eclipse.
  2. Another way to create a springboot maven project in your eclipse is first you need to install one plug-in to your eclipse.

Steps to install the Plug-in:

  1. Open you eclipse.

  2. Help-> Eclipse Marketplace

  3. Search Spring tools. Install it and restart your eclipse

  4. After that go to File-> New-> Other

  5. Search for Spring Starter Project. After that you are good to go to create a springboot maven project.

CodePudding user response:

To create a Maven project with Spring Boot dependencies, you want to :

  1. Generate a project using the Spring Initializr available here. Don't forget to add all the dependencies you need.

  2. Unzip the folder in the desired directory.

  3. In Eclipse, click File -> Import ... -> Maven -> Existing Maven Projects -> Next

  4. On the popup, click Browse ... and select the root of your unzipped folder and then click on finish.

  5. To display the packages, right click on your newly imported project and click on Maven -> Update Project -> Ok

  • Related