I am working currently on a project which includes the Spring Framework. Everything is working as aspect but there is one problem. When I try to start my application onto my lap
Add this dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
I met the same problem, I fix by these steps as below:
update file application.yml
1- remove:
main:
web-application-type: none
2- if your change server port already, it's still error:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
solution: move server port config on the top of yml file
Done! it's for my case.
For me what caused this was that I had this property below, in the application properties (carried over by mistake from a test application.properties file). See if any of your property files that are included have this like below, and remove it:
# disables the servlet-container initialization (for unit testing only)
spring.main.web-application-type=none
Problem is solved - thanks for your help crazycoder. The issue was caused by an older version of tomcat. After upating the embedded tomcat of Spring to 1.5.3_RELEASE and updating mysql-jdbc-driver as well , it finally worked for me. I adjusted the pom.xml like this:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>