maven


Spring Boot 1.5.3 web application terminate immediately after started


After started the Spring Boot Project running on 1.5.3.RELEASE the logs running then force stop
Anyone have any idea why 1.5.3 is stop, I tried 1.4.6 The started successfully
Pom.xml
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
The Application
import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.stereotype.*;
import org.springframework.web.bind.annotation.*;
#SpringBootApplication
#Controller
#EnableAutoConfiguration
public class DemoApplication {
#RequestMapping("/")
#ResponseBody
String home() {
return "Hello World!";
}
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
Logs
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------------------------------------------------------
---
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] ---------------------------------------------------------------------
---
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.3.RELEASE:run (default-cli) > test-
compile # demo >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\Workspace\spring\demo\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.3.RELEASE:run (default-cli) < test-compile # demo <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.3.RELEASE:run (default-cli) # demo ---
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.3.RELEASE)
2017-05-10 15:25:09.638 INFO 11112 --- [ main] com.example.DemoApplication : Starting DemoApplication on WutikornMat with PID 11112 (D:\Workspace\sp
ring\demo\target\classes started by sutee.cha in D:\Workspace\spring\demo)
2017-05-10 15:25:09.643 INFO 11112 --- [ main] com.example.DemoApplication : No active profile set, falling back to default profiles: default
2017-05-10 15:25:09.739 INFO 11112 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigAppli
cationContext#3a723bfc: startup date [Wed May 10 15:25:09 ICT 2017]; root of context hierarchy
2017-05-10 15:25:10.599 INFO 11112 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-05-10 15:25:10.617 INFO 11112 --- [ main] com.example.DemoApplication : Started DemoApplication in 1.599 seconds (JVM running for 5.332)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.069 s
[INFO] Finished at: 2017-05-10T15:25:10+07:00
[INFO] Final Memory: 33M/398M
[INFO] ------------------------------------------------------------------------
2017-05-10 15:25:10.751 INFO 11112 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicat
ionContext#3a723bfc: startup date [Wed May 10 15:25:09 ICT 2017]; root of context hierarchy
2017-05-10 15:25:10.754 INFO 11112 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
Then I run the jar via command line outside IDE
2017-05-10 15:38:57.630 INFO 7532 --- [ main] com.example.DemoApplication : Starting DemoApplication v0.0.1-SNAPSHOT on WutikornMat with PID 7532 (D
:\Workspace\spring\demo\target\demo-0.0.1-SNAPSHOT.jar started by sutee.cha in D:\Workspace\spring\demo\target)
2017-05-10 15:38:57.638 INFO 7532 --- [ main] com.example.DemoApplication : No active profile set, falling back to default profiles: default
2017-05-10 15:38:57.765 INFO 7532 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplic
ationContext#255316f2: startup date [Wed May 10 15:38:57 ICT 2017]; root of context hierarchy
2017-05-10 15:38:58.973 INFO 7532 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-05-10 15:38:58.997 INFO 7532 --- [ main] com.example.DemoApplication : Started DemoApplication in 1.888 seconds (JVM running for 2.455)
2017-05-10 15:38:59.000 INFO 7532 --- [ Thread-2] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicati
onContext#255316f2: startup date [Wed May 10 15:38:57 ICT 2017]; root of context hierarchy
2017-05-10 15:38:59.003 INFO 7532 --- [ Thread-2] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
So you can see the Setup and Example is exactly the same as spring docs
What I missed on 1.5.3
Thanks in advance
If you look at the current example there is no #SpringBootApplication annotation, but
#RestController
#EnableAutoConfiguration
public class DemoApplication {
This runs out of the box. If I start your example, I get
** WARNING ** : Your ApplicationContext is unlikely to start due to a #ComponentScan of the default package.
If I move the class from the default package to any package - let's say demo - the application starts correctly.

Related Links

maven determine default lifecycle phase for plugin
Multiple errors staging a release in Maven?
Maven project not built pom.xml error
Maven: Can i have resources copied in WEB-INF and also in some other directory?
Maven sonar plugin configurations for findbugs pmd checkstyle cobertura
Update site built by Tycho still contains erroneous dependency after re-build
How to run testNG tests using Maven POM file
publish an installation of hadoop in the local maven repository
org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2 error
Using the properties tag within maven profiles
Embedded tomcat won't let my selenium/jbehave stories run
GWT & Maven: applying code formatter
Best practices in naming conventions on Maven artifactID (is there restriction?)
“Non-resolvable parent POM” with Play framework project using Maven
Keep getting java.lang.OutOfMemoryError: PermGen space error
copy dependencies transitive and not transitive

Categories

HOME
log4j
wso2-am
hive
openstack
angular-material
stock
hashmap
session
bpmn
alfresco
dxl
angular-ui-bootstrap
basic
awesome-wm
communication
midi
google-cloud-ml
fortumo
iolanguage
uitypeeditor
after-effects
pugjs
http-status-code-504
nhibernate-envers
plunker
visjs
web-sql
telerik-reporting
claims-based-identity
cas
apache-commons-io
traffic
strncpy
maquette
elasticsearch-ruby
facebook-apps
windows-server-2000
javascriptcore
document.write
mesos-chronos
galen
ruby-on-rails-3.1
grid.mvc
reportingservices-2005
heightmap
babel-core
apple-news
cubic-spline
fault
promela
ionicons
blogengine.net
cudafy.net
django-scheduler
specrun
migradoc
android-fonts
rotativa
mongocsharpdriver
fputcsv
jwplayer7
holder.js
actionbardrawertoggle
sdf
two-factor-authentication
energy
javax.sound.midi
security-testing
mono-embedding
clipperlib
e10s
asp.net-dynamic-data
elliptic-curve
p4java
balanced-payments
typo3-neos
gridfs
dexterity
sitemesh
ruby-datamapper
pygit2
frameset
word-processor
jspinclude
semantic-diff
boost-filesystem
createwindow
coda-slider
dentrix
rescale
data-acquisition
wsdl.exe

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App