Inside Spring Boot I always put web pages in a folder such as public or webapps or views and place it in the src/main/resources directory as you can see in application.properties .

and this is my application.properties :
server.port=15800 spring.mvc.view.prefix=/public/ spring.mvc.view.suffix=.html spring.datasource.url=jdbc:mysql://localhost:3306/hibernatedb spring.datasource.username=root spring.datasource.password=password spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.hibernate.ddl-auto = update spring.jpa.properties.hibernate.format_sql = true logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
as soon as you put a URL, for example servername:15800 and this request received by the Spring Boot manager will look for index.html exactly and this name will be in the case when spring.mvc.view.suffix will be html, jsp, htm etc.
Hope this helps a lot.
ArifMustafa Apr 16 '18 at 14:38 2018-04-16 14:38
source share