Skip to content

Commit 87e30d1

Browse files
toedterodrotbohm
authored andcommitted
Replaced HAL Browser documentation with HAL Explorer documentation.
Removed unnecessary CustomPostForm.js from HAL Explorer. HAL Explorer natively supports Spring Profiles. Update link in README.adoc to the HAL Explorer section in the reference docs Correct typo and incorrect description in HAL-Explorer section. Fixes #2005.
1 parent a7df70c commit 87e30d1

File tree

9 files changed

+16
-218
lines changed

9 files changed

+16
-218
lines changed

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The first exporter implemented is a JPA Repository exporter. This takes your JPA
1717
* Allows to https://docs.spring.io/spring-data/rest/docs/current/reference/html/#events[hook into the handling of REST requests] by handling Spring `ApplicationEvents`.
1818
* https://docs.spring.io/spring-data/rest/docs/current/reference/html/#metadata[Exposes metadata] about the model discovered as ALPS and JSON Schema.
1919
* Allows to define client specific representations through https://docs.spring.io/spring-data/rest/docs/current/reference/html/#projections-excerpts[projections].
20-
* Ships a customized variant of the https://docs.spring.io/spring-data/rest/docs/current/reference/html/#_the_hal_browser[HAL Browser] to leverage the exposed metadata.
20+
* Ships the latest release of https://docs.spring.io/spring-data/rest/docs/current/reference/html/#hal-explorer[HAL Explorer] to easily explore HAL based HTTP responses.
2121
* Currently supports JPA, MongoDB, Neo4j, Solr, Cassandra, Gemfire.
2222
* Allows https://docs.spring.io/spring-data/rest/docs/current/reference/html/#customizing-sdr[advanced customizations] of the default resources exposed.
2323

spring-data-rest-hal-explorer/src/main/resources/META-INF/spring-data-rest/hal-explorer/js/CustomPostForm.js

Lines changed: 0 additions & 203 deletions
This file was deleted.
-356 KB
Binary file not shown.
-67.2 KB
Binary file not shown.
-77.3 KB
Binary file not shown.
42.8 KB
Loading
10.1 KB
Loading
9.64 KB
Loading

src/main/asciidoc/tools.adoc

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
= Tools
33
:spring-data-rest-root: ../../../..
44

5-
== The HAL Browser
5+
[[hal-explorer]]
6+
== HAL Explorer
67

7-
The developer of the http://stateless.co/hal_specification.html[HAL specification] has a useful application: https://github.com/mikekelly/hal-browser[the HAL Browser]. It is a web application that stirs in a little HAL-powered JavaScript. You can point it at any Spring Data REST API and use it to navigate the app and create new resources.
8+
Kai Tödter has created a useful application: https://github.com/toedter/hal-explorer[HAL Explorer]. It is an Angular based web application that lets you easily explore HAL and HAL-FORMS based HTTP responses. It also supports Spring profiles generated by Spring Data REST. You can point it at any Spring Data REST API and use it to navigate the app and create new resources.
89

910
Instead of pulling down the files, embedding them in your application, and crafting a Spring MVC controller to serve them up, all you need to do is add a single dependency.
1011

@@ -16,7 +17,7 @@ The following listing shows how to add the dependency in Maven:
1617
<dependencies>
1718
<dependency>
1819
<groupId>org.springframework.data</groupId>
19-
<artifactId>spring-data-rest-hal-browser</artifactId>
20+
<artifactId>spring-data-rest-hal-explorer</artifactId>
2021
</dependency>
2122
</dependencies>
2223
----
@@ -28,29 +29,29 @@ The following listing shows how to add the dependency in Gradle:
2829
[source,groovy]
2930
----
3031
dependencies {
31-
compile 'org.springframework.data:spring-data-rest-hal-browser'
32+
implementation 'org.springframework.data:spring-data-rest-hal-explorer'
3233
}
3334
----
3435
====
3536

3637
NOTE: If you use Spring Boot or the Spring Data BOM (bill of materials), you do not need to specify the version.
3738

38-
This dependency auto-configures the HAL Browser to be served up when you visit your application's root URI in a browser. (NOTE: http://localhost:8080 was plugged into the browser, and it redirected to the URL shown in the following image.)
39+
This dependency auto-configures the HAL Explorer to be served up when you visit your application's root URI in a browser. (NOTE: http://localhost:8080/api was plugged into the browser, and it redirected to the URL shown in the following image.)
3940

40-
image::hal-browser-1.png[]
41+
image::hal-explorer-1.png[]
4142

42-
The preceding screen shot shows the root path of the API. On the right side are details from the response, including headers and the body (a HAL document).
43+
The preceding screenshot shows the root path of the API. On the right side are details from the response, including headers, and the body (a HAL document).
4344

44-
The HAL Browser reads the links from the response and puts them in a list on the left side. You can either click on the *GET* button and navigate to one of the collections, or click on the *NON-GET* option to make changes.
45+
The HAL Explorer reads the links from the response and puts them in a list on the left side. You can either click on the green *GET* button and navigate to one of the collections, or click on the other buttons to make changes (POST, PUT, PATCH) or delete resources.
4546

46-
The HAL Browser speaks *URI Template*. Above the *GET* button and next to *persons*, the UI has a question mark icon. An expansion dialog pops up if you choose to navigate to it, as follows:
47+
The HAL Explorer understands *URI Templates*. Whenever a link contains a URI template, a modal dialog pops up where you can enter the template parameters.
4748

48-
image::hal-browser-3.png[]
49+
image::hal-explorer-3.png[]
4950

50-
If you click *Follow URI* without entering anything, the variables are essentially ignored. For situations like <<projections-excerpts>> or <<paging-and-sorting>>, this can be useful.
51+
If you click *Go!* without entering anything, the variables are essentially ignored. For situations like <<projections-excerpts>> or <<paging-and-sorting>>, this can be useful.
5152

52-
When you click on a *NON-GET* button, a pop-up dialog appears. By default, it shows *POST*. This field can be adjusted to either *PUT* or *PATCH*. The headers are filled out to properly to submit a new JSON document.
53+
When you click on a *NON-GET* button with a `+` or a `>` sign on it, a modal dialog appears. It shows the HTTP method belonging to the clicked button. You can fill the body and submit the new JSON document.
5354

54-
Below the URI, method, and headers are the fields. These are automatically supplied, depending on the metadata of the resources, which was automatically generated by Spring Data REST. If you update your domain objects, the pop-up reflects it, as the following image shows:
55+
Below the URI and HTTP method are the fields. These are automatically supplied, depending on the metadata of the resources, which was automatically generated by Spring Data REST. If you update your domain objects, the pop-up reflects it, as the following image shows:
5556

56-
image::hal-browser-2.png[height="150"]
57+
image::hal-explorer-2.png[]

0 commit comments

Comments
 (0)