In Tomcat run will not be able to access the,
Is in accordance with the normal steps to
The first: & lt; Packaging> War
The second: & lt; Dependency>
Third:
Public class Main {
//here with tomcat startup read twice, please leave a message a great god help, solve
Public static void main (String [] args) {
SpringApplication. Run (Application class, args);
}
}
Fourth:
@ EnableTransactionManagement
@ SpringBootApplication
@ MapperScan (" com. Ykf. Mattess. Dao ")
Public class Application extends SpringBootServletInitializer {
Protected SpringApplicationBuilder configure (SpringApplicationBuilder application) {
The return application. Sources (application. The class);
}
}
To run the tomcat
And will and encountered the same problem of bosses problem under analysis
CodePudding user response:
Control layer must be started with springboot main principal classes in a package under the pathCodePudding user response:
With asked, feeling that haven't been able to scan, eclipse can be localCodePudding user response:
Into the war and then after running locally springboot main executable program and then you in normal visit again is not an error on the server can normal boot, as an errorCodePudding user response:
Springboot spring - the boot - starter - tomcat has built-in tomcat, you want to use the external tomcat deployment, in relying on statement using external tomcatCodePudding user response:
Meet the same problem, I put into the war tomcat8, can access, but in tomcat7, start the success, but no response, also do not appear error 404CodePudding user response:
Meet the same problem, I put into the war tomcat8, can access, but in tomcat7, start the success, but no response, also do not appear 404 error,Excuse me, can you solve it, this is what circumstance,
My project is to use springboot version is 1.5.14
CodePudding user response:
Need to make sure that the version of tomcat is 8 and above, the JDK is more than 8CodePudding user response:
While you use the external tomcat, but has not ruled out springBoot embedded tomcat, this should is the cause of the problem