1

I am experimenting with Spring Boot and have created a simple Spring Boot webapp that should just expose a simple/mock homepage at http://localhost:9200.

Here is the source code on GitHub.

When I run this locally (instructions are in the README), there are no errors in the console output. However, when I point a browser at http://localhost:9200, I am prompted for an HTTP Basic Auth-style username + password combo (which I definitely did not add myself), and am never able to actually see the homepage (which is located in that repo under src/main/resources/templates/web/index.html).

In the console output I get this stack trace:

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "error", template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246) ~[thymeleaf-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104) ~[thymeleaf-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060) ~[thymeleaf-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011) ~[thymeleaf-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]
    at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335) ~[thymeleaf-spring4-2.1.4.RELEASE.jar!/:2.1.4.RELEASE]

Can anyone spot where I'm going awry? The stack trace doesn't make a lot of sense to me.

According to this answer I have a duplicate forward-slash in one of my paths (//) but for the life of me I cannot see where!

Community
  • 1
  • 1
smeeb
  • 27,777
  • 57
  • 250
  • 447
  • 2
    basic authentication comes from security dependency. Are you expecting to use thymeleaf? – jny Aug 25 '16 at 18:12
  • Thanks @jny (+1) - I removed the security dependency and the basic auth dialog went away - thanks for the help there! However, when I go to `http://localhost:9200` I am still getting a blank screen and the same error in the log. – smeeb Aug 25 '16 at 18:41

1 Answers1

1

Your WebController class has a wrong package definition - com.surancehub.controllers, should be hotmeatballsoup.bootup.controllers in order to be picked up by Boot

Miloš Milivojević
  • 5,219
  • 3
  • 26
  • 39