Introduction to Spring Data JPA Programming --Amazon says that the REST client of Spring Data REST has HAL Browser, so I will move it.
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
</dependencies>
@RestController
@SpringBootApplication
public class App {
@RequestMapping("/hoge")
public String hoge() {
return "{\"sdfsa\":\"hogehoge\"}";
}
public static void main(String[] args) {
SpringApplication.run(App.class, args);
}
}
Go to http: // localhost: 8080 /.
However, since the main purpose is to check the operation of HAL of spring-data-rest
, it is a delicate place as a general-purpose GUI REST client. As I wrote above, I can access my own `@ RestController``` other than
`spring-data-rest```, so I can use it for local operation check ... but I put a dependency for that Is a little subtle.
Recommended Posts