Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/coder-acjhp/spring-boot-restful-test

Simple spring-boot-jpa-restful api
https://github.com/coder-acjhp/spring-boot-restful-test

embedded-apache-derby spring-boot spring-data-jpa spring-rest-api

Last synced: 4 days ago
JSON representation

Simple spring-boot-jpa-restful api

Awesome Lists containing this project

README

        

Spring-boot-data-jpa-rest-api example


In this repository I will create simple spring-boot-jpa-restful api and for testing it I used Apache Derby embedded database.


I saw in some tutorials they not adding any annotation on ApplicationStart.class but for me not worked so we have to add some annotations to our start class to say to Spring Hey Spring we have Service classes and Controller classes located in '------' package


Some thing like this :





@SpringBootApplication
@EntityScan(basePackages = "com.coder.web.rest.entity")
@ComponentScan(basePackages = "com.coder.web.rest")
@EnableJpaRepositories(basePackages = "com.coder.web.rest.service")
public class SpringBootRestfulJpaApplication {

public static void main(String[] args) {
SpringApplication.run(SpringBootRestfulJpaApplication.class, args);
}
}


NOTE : For making your api test you can use POSTMAN application as plugin on Chrome or as standalone application on your computer.