0

I am experiencing a problem with my Spring Boot project. When I run the application and go to http://localhost:8086/ it redirects to http://localhost:8086/login which is not the page I want.

This is the content of my application.properties file

#Database
spring.datasource.url=jdbc:mysql://localhost:3306/db_name
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.platform=mysql
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

#Html
spring.mvc.view.prefix=/public/
spring.mvc.view.suffix=.html

#Server
server.port=8086 

I have also added this class which is supposed to open the index.html file found in the /public/ folder as specified in the properties above

public class WebAppConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("forward:/index.html");
    }

}

Is there something that I am doing wrong or should I log in first in the page that it redirects to?

user1234567
  • 37
  • 1
  • 10

1 Answers1

1

Hopefully Here you can find your answer, basically it's in the configuration

Rami GB
  • 789
  • 1
  • 8
  • 19