Monday, 23 December 2019

Spring Project Creation

Spring Project Creation

1)Project creation at spring Initializer

The following link is sued to create the projects where we can give java,spring version and dependencies like (Spring Web,Tools,H2,JPA, etc..,)
https://start.spring.io/
 i)Select Maven project(By default it is selected)
ii)Select the Language as Java
iii)Select the Spring Boot like 2.2.2 or 2.2.3 snap shot
iv)And enter the Group and artefact like

 Options also we can give
  Packaging : as jar by default it is selected.
  Java: Version can select as 8
Once we give all the information, we have to click on generate tab. So that it will generate project and down load into our local location.
2)Importing the project into STS and Run the application
  Once down load is completed then extract the zip with 7 zip then import in sts(Spring tool suite).
  Import by using right clicking on the Navigator or Package Explorer by clicking right mouse button and select the import button.
  Then Expand  Maven option and select the Existing maven project and select the Next button and Browse the path what we down loaded the project path or copy past the path
  Then click on Finish button.
  And verify project and verify the pom.xml file whether required dependencies are added or not.
  Once everything is fine select the pom.xml file and right click on this pom.xml file and select maven option and select Update project.
  This Update project will down load all the required jars via net for the defined dependencies.


No comments:

Post a Comment