Reputation: 11
I am newbie to Spring, I have written a spring application. when I try to start the application its giving me below logs but application being shutdown.
could you please help me anyone if i am doing something wrong here ?
2017-06-01 16:39:27.187 INFO 6040 --- [ main] com.slb.sims.flows.Application : Starting Application on SLB-25QDSY1 with PID 6040 (D:\SLB\SpringPOCs\prjSpringJDBCWS\target\classes started by LTangirala in D:\SLB\SpringPOCs\prjSpringJDBCWS)
2017-06-01 16:39:27.191 INFO 6040 --- [ main] com.slb.sims.flows.Application : No active profile set, falling back to default profiles: default
2017-06-01 16:39:27.313 INFO 6040 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@2c34f934: startup date [Thu Jun 01 16:39:27 CDT 2017]; root of context hierarchy
2017-06-01 16:39:28.448 INFO 6040 --- [ main] o.s.c.s.ClassPathXmlApplicationContext : Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@2f16c6b3: startup date [Thu Jun 01 16:39:28 CDT 2017]; root of context hierarchy
2017-06-01 16:39:28.452 INFO 6040 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [applicationContext.xml]
2017-06-01 16:39:28.592 INFO 6040 --- [ main] o.s.j.d.DriverManagerDataSource : Loaded JDBC driver: com.mysql.jdbc.Driver
2017-06-01 16:39:29.080 INFO 6040 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-06-01 16:39:29.095 INFO 6040 --- [ main] com.slb.sims.flows.Application : Started Application in 2.342 seconds (JVM running for 3.083)
2017-06-01 16:39:29.096 INFO 6040 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2c34f934: startup date [Thu Jun 01 16:39:27 CDT 2017]; root of context hierarchy
2017-06-01 16:39:29.098 INFO 6040 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
Picked up _JAVA_OPTIONS: -Xmx1024M
Upvotes: 1
Views: 1374
Reputation: 325
it doesn't have an embedded server like Tomcat in classpath. add it and it will fix the issue for MAVEN add this dependancy in pom.xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
for Gradle (build.gradle) add
dependencies {
compile 'org.springframework.boot:spring-boot-starter-web'
}
Upvotes: 2
Reputation: 11
You need to add this dependency to your pom.xml. After that it should work.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
Upvotes: 1