Whitelabel Error Page [SpringBoot + thymeleaf]

0

Good night, I'm having an error that stays the same even though I'm changing some things in my pom.xml and other places anyway.

Error:

   Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.

Controller:    Note: I've tried to return a String

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping(value="/")
public class IndexController {


    @RequestMapping(method=RequestMethod.GET)
    public ModelAndView redirect() {
        ModelAndView mv = new ModelAndView("Index.html");
        return mv;
    }

}

HTML:          

    <head>
        <title>Arcoverde</title>

        <meta charset="utf-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>

        <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css"/>
        <link href="/css/floating-labels.css" rel="stylesheet"/>

    </head>


    <body>

    <form class="form-signin">

        <div class="text-center mb-5">
            <img class="mb-4" src="https://getbootstrap.com/assets/brand/bootstrap-solid.svg"alt="" width="72" height="72">
            <h1 class="h2 mb-3 text-primary">Entrar</h1>
            <p><a href="">Crie</a>&nbsp;ou acesse sua conta para marcação de uma consulta no medico da sua area.</p>
        </div>

        <div class="form-label-group mb-2">
            <input type="email" id="inputEmail" class="form-control" placeholder="Email address" required autofocus>
            <label for="inputEmail">Email</label>
        </div>

        <div class="form-label-group mt-4">
            <input type="password" id="inputPassword" class="form-control" placeholder="Password" required>
            <label for="inputPassword">Senha</label>
        </div>

        <div class="checkbox mb-4">

            <label>
                <input type="checkbox" value="remember-me">Lembre-me
            </label>

        </div>

        <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
        <p class="mt-5 mb-3 text-muted text-center">&copy; LucasH</p>

    </form> 

    <script src="/js/bootstrap.min.js"></script>

    </body>

</html>

POM:

<parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.3.1.RELEASE</version>
     </parent>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    
asked by anonymous 23.05.2018 / 06:24

0 answers