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

phantomjs-maven-plugin : error Could not find a suitable constructor
Where to add Maven dependencies in a multi-module Vaadin project in NetBeans 8?
SBT unresolved dependency: com.paypal.sdk#paypal-core;LATEST
Expected GPG user ID for Maven Central artifacts?
Maven release from a branch by jenkins
how can i use elasticsearch 2.2.1 with apache camel
Maven and Jenkins - 'mvn' is not recognized as an internal or external command,
Automate Version Name in Install4j
Why does Maven not use my privatekey when deploying with scp?
Maven copy jars from network location
Goal specific javax.net.ssl.trustStore
Issue while creating eclipse p2 repository using maven tycho plugin
How to add Apache Maven to PATH permanently
find path to JAX-RS resource
Docker Jenkins Integration
maven does not open the browser

Categories

HOME
arduino-uno
hive
openstack
reserved
plone
appx
adb
microservices
jpeg
ip
callback
multiple-records
hex-editors
dynamics-crm-online
caml
vaadin7
dosgi
clojurescript
libtiff
jsdoc
pugjs
amazonsellercentral
autocad-plugin
java-3d
functional-testing
dcevm
microsoft-r
maquette
dbclient
quote
microsoft-chart-controls
code-contracts
openoffice.org
squib
eigenvalue
nxlog
bootstrap-dialog
heightmap
avconv
taffy
parentheses
azure-application-gateway
ionicons
vtigercrm
google-cdn
medium.com
azure-sdk
dstu2-fhir
thrust
player
jwplayer7
moveit
rvest
php-parse-error
phpcas
pervasive-sql
lemon
retina
graph-drawing
fluid-dynamics
lustre
nstableviewcell
camanjs
relocation
issuu
mesa
android-radiobutton
sgen
aapt
jquery-layout
phpthumb
doskey
html5-notifications
drools-planner
distutils
browser-detection
labwindows
parametric-equations
qtkit
boost-filesystem
gnustep
spyware
blackberry-playbook
recent-documents
lpeg
wise
xsdobjectgen
sef
exchange-server-2003
zune
w3wp
post-build
misv

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