Home > Back-end >  IDEA start a non-existing templates?
IDEA start a non-existing templates?

Time:09-10

have problem with IDEA?

I create new Spring Boot project, with dependency Spring Web, Spring Security, Spring JPA and others

Create two simple class

  1. main class

  2. Controller Class

@Controller public class {

@GetMapping("")
public String Home() {
    return "homes";
}

}

And simple templates "homes.html"

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Home Code Java</title>
</head>
<body>
<h1> Welcome to home JVM</h1>

</body>
</html>

WHY MY IDEA START THIS??? https://drive.google.com/drive/folders/1dnn-IKkpaBeouyqnGU13YLf1GBPVd_jQ?usp=sharing WHAT IS IT ???? in this link different template, not my! but port is my, localhost 9092/ this port is - localhost 9092/login? where did login come from with this templates ?

my link in @GetMapping (""), not (/login)

PLS HELP !

in properties port=9092

CodePudding user response:

You have added spring security dependency in your pom.xml and that is the reason spring is securing all the endpoints by default.

Either remove the dependency or configure it to allow access to wanted endpoints.

CodePudding user response:

I think this happens because of Adding the dependencies of Spring Security to you pom.xml, which automatically securing the endpoints by default.

try removing this dependency or configure it to allow access to the endpoint you want.

  • Related