Home > Back-end >  Springboot start access localhost: access to start tomcat error 404
Springboot start access localhost: access to start tomcat error 404

Time:10-06

Springboot start access localhost: access to start tomcat error 404 development tool idea, directly with plug-ins created project above,
To see a lot of idea to create online test process of the project, you not met the same problem?



//springboot program entry
@ SpringBootConfiguration
//configure open automatic assembly
@ EnableAutoConfiguration (exclude={DataSourceAutoConfiguration. Class})
Public class ZxscApplication {
/* hello */
Public static void main (String [] args) {
SpringApplication. Run (ZxscApplication. Class, args);
}
}
4


The project structure is created that preach not up images

CodePudding user response:

How did you visit? Localhost: 8070/project/method???

CodePudding user response:

Access to start tomcat

CodePudding user response:

Localhost: 8070/project name/define your own path

CodePudding user response:

Where is your @ Controller @ RequestMapping?

CodePudding user response:

Logs can be cut a little more,,,

CodePudding user response:

You put your application. The o yml to see
Also, you have to write the controller layer,,

CodePudding user response:

Template with thymeleaf yao

CodePudding user response:

Your controller?

CodePudding user response:

Many people didn't understand your problem, you say, in fact, is through the springboot launched the Tomcat, want to visit the Tomcat home page, the other no matter, idea is right, this is not allowed, you are correct, the default so it can't,

CodePudding user response:

Sorry, add a little, you can be in the resource under static or templates, put a index. The HTML (the name must be), the system will be localhost: 8080, returned to the static page, the program will automatically find the index page, as a welcome page in the system, the order is static and then templates,

CodePudding user response:

On 9/f, said u
The built-in tomcat can have no Windows version of the static page,,,

CodePudding user response:

references 9/f, I heart very comforting to have reply:
many people didn't understand your problem, you say, in fact, is through the springboot launched the Tomcat, want to visit the Tomcat home page, the other no matter, the idea is right, this is not allowed, you do is all right, by default, so that it can not be


I was finally found the source of this depressed a afternoon

CodePudding user response:

With the controller?
  • Related