Spring Data REST - HAL browser - returning HAL browser HTML rather than root of API
<p>I am having a look into Spring Data REST, specifically the HAL browser. I have been following the documentation at <a href="http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_the_hal_browser" rel="nofollow noreferrer">http://docs.spring.io/spring-data/rest/docs/current/reference/html/#_the_hal_browser</a>.</p>

<p>When I navigate to <code>http://localhost:8080</code> it redirects me (as expected) to <code>http://localhost:8080/browser/index.html#/</code>, and the HAL browser is displayed. My issue is, rather than this page displaying details about the root of my API, it is trying to display itself. For example, the <strong>Response Body</strong> section has the <code>HTML</code> of the HAL browser in it, not <code>JSON</code> from my API.</p>

<p><a href="https://i.stack.imgur.com/RtKEz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RtKEz.png" alt="Screenshot of Response body"></a></p>

<p>I'm not sure if I have done something wrong in my setup - it is pretty vanilla (complete source listing below), so would appreciate any pointers in the right direction!</p>

<p>For completeness - if I enter <code>/users</code> into the <strong>Explorer</strong> text field and select Go!, then I do see details of my API as expected. Furthermore, if I remove the HAL browser dependency and browse to <code>http://localhost:8080</code>, then I see the root of my API as expected.</p>

<p><a href="https://i.stack.imgur.com/GwgzG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GwgzG.png" alt="Screenshot of response when not using HAL browser"></a></p>

<p><em>pom.xml</em></p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;sample&lt;/groupId&gt;
    &lt;artifactId&gt;restsample&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;

    &lt;name&gt;My application&lt;/name&gt;
    &lt;description&gt;My application description&lt;/description&gt;

    &lt;parent&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
        &lt;version&gt;1.4.0.RELEASE&lt;/version&gt;
        &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
    &lt;/parent&gt;

    &lt;properties&gt;
        &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
        &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
        &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&gt;

    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-data-rest&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
            &lt;artifactId&gt;spring-data-rest-hal-browser&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
            &lt;artifactId&gt;lombok&lt;/artifactId&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;com.h2database&lt;/groupId&gt;
            &lt;artifactId&gt;h2&lt;/artifactId&gt;
            &lt;scope&gt;runtime&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;

&lt;/project&gt;
</code></pre>

<p><em>Application.java</em></p>

<pre><code>@SpringBootApplication
public class Application {
    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}
</code></pre>

<p><em>User.java</em></p>

<pre><code>@Data
@Entity
public class User {
    @Id
    @GeneratedValue
    private Long id;

    @NotBlank
    @Size(min = 1, max = 100)
    @Column(unique = true)
    private String username;
}
</code></pre>

<p><em>UserRepository.java</em></p>

<pre><code>@RepositoryRestResource
public interface UserRepository extends CrudRepository&lt;User, Long&gt; {
    User save(User user);
}
</code></pre>