This is a RESTFUL API project using Springboot technology with following method for simple CRUD purposes :
- JPA Repository
- MySQL Database
- Hibernate
- Custom JSON ResponseEntity
- File > New > Maven Project.
- Select project name and location Dialog > Let it be default.
- Select an Archetype > choose maven-archetype-webapp.
- Enter Artifact id > enter your group id for the
package path
and enter your artifact id for yourapp name
. - Click finish and wait the maven update.
- Add parent after
url tag
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.4.RELEASE</version>
<relativePath/>
</parent>
- Add the dependency in
dependecies tag
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
Notes that web app have a dependency of data-jpa than that project require an application.properties file
- Right click on src/main/resources > new > other
- In create wizard dialog > go to general files > next
- In create new file resources > enter your directory to src/main/resources and your file name applicaton.properties