Skip to content

SimpleSpringBoot

Jim Potter edited this page Dec 13, 2021 · 6 revisions

Creating a 1 page SpringBoot webapp

This should be straightforward (I hope) - prereqs:

  • Java (I've got Java corretto 11 installed), included in classpath
  • Gradle (binaries downloaded), included in classpath
  • VSCode with extensions (...)

Getting the code:

Go to: https://start.spring.io/

  • Gradle project
  • SpringBoot 2.6.1
  • Group: stuff.things
  • Artifact: SpringBootSAML
  • Jar
  • Java 11
  • Dependencies: Spring Web
  • Generate
  • unzip into directory
  • Open that directory in VSCode

In VSCode:

  • build and run in a terminal (gradle bootRun)
  • Browse to http://localhost:8080 (should get an error page)
  • add a file index.html in src/main/resources/static/
  • stop and re-run gradle bootRun
  • Browse to http://localhost:8080 (should get your index.html page)

See code: https://github.com/jim-reespotter/SpringBootSAML/tree/NoAuthentication

Clone this wiki locally