Web process failed to bind to $PORT within 90 seconds of launch - java

I am trying to deploy simple spring boot application with a single REST on heroku. The application is located here: application
My Procfile looks like this
web: java -jar target/java-cloud-sample-0.0.1-SNAPSHOT.jar -Dserver.port=$PORT
Build log on heroku looks like this
-----> Java app detected
-----> Installing JDK... version 9 installed
-----> Installing Maven... version 3.5.0 installed
-----> Maven home: /app/tmp/cache/.maven
-----> Java home: /tmp/build_26e32238a62f5da3214e452f0481421a/.jdk
-----> Build dir: /tmp/build_26e32238a62f5da3214e452f0481421a
-----> Executing build...
mvn -B -Duser.home=/tmp/build_26e32238a62f5da3214e452f0481421a -Dmaven.repo.local=/app/tmp/cache/.m2/repository -DskipTests=true -U clean install
[INFO] MAVEN_OPTS=-Xmx384m -Xss128m
[INFO] ------------------------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building java-cloud-sample 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) # java-cloud-sample ---
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.6.RELEASE:build-info (default) # java-cloud-sample ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # java-cloud-sample ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.6.2:compile (default-compile) # java-cloud-sample ---
[INFO] Required automodules detected. Please don't publish this project to a public artifact repository!
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 3 source files to /tmp/build_26e32238a62f5da3214e452f0481421a/target/classes
[INFO]
....
[INFO] --- maven-install-plugin:2.5.2:install (default-install) # java-cloud-sample ---
[INFO] Installing /tmp/build_26e32238a62f5da3214e452f0481421a/target/java-cloud-sample-0.0.1-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/com/lapots/breed/platform/cloud/java-cloud-sample/0.0.1-SNAPSHOT/java-cloud-sample-0.0.1-SNAPSHOT.jar
[INFO] Installing /tmp/build_26e32238a62f5da3214e452f0481421a/pom.xml to /app/tmp/cache/.m2/repository/com/lapots/breed/platform/cloud/java-cloud-sample/0.0.1-SNAPSHOT/java-cloud-sample-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.037 s
[INFO] Finished at: 2017-09-03T14:01:08Z
[INFO] Final Memory: 32M/107M
[INFO] ------------------------------------------------------------------------
-----> Cleaning enviroment
- Deleting local Maven repository... done
-----> Discovering process types
Procfile declares types -> web
-----> Compressing...
Done: 309.9M
-----> Launching...
! Warning: Your slug size exceeds our soft limit (309 MB) which may affect boot time.
Released v7
https://java-cloud-sample.herokuapp.com/ deployed to Heroku
Here is the log I get for the application
2017-09-03T14:05:04.778676+00:00 heroku[web.1]: Starting process with command `java -jar target/java-cloud-sample-0.0.1-SNAPSHOT.jar -Dserver.port=14556`
2017-09-03T14:05:10.685730+00:00 app[web.1]:
2017-09-03T14:05:10.685803+00:00 app[web.1]: . ____ _ __ _ _
2017-09-03T14:05:10.685868+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2017-09-03T14:05:10.685937+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2017-09-03T14:05:10.685992+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2017-09-03T14:05:10.686055+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2017-09-03T14:05:10.686108+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2017-09-03T14:05:10.708407+00:00 app[web.1]: :: Spring Boot :: (v1.5.6.RELEASE)
2017-09-03T14:05:10.708470+00:00 app[web.1]:
2017-09-03T14:05:11.192342+00:00 app[web.1]: 2017-09-03 14:05:11.185 INFO 4 --- [ main] c.l.b.p.c.j.JavaCloudSampleApplication : Starting JavaCloudSampleApplication v0.0.1-SNAPSHOT on f4c891ec-7872-4f32-996e-1fe573ea2ca7 with PID 4 (/app/target/jav
a-cloud-sample-0.0.1-SNAPSHOT.jar started by u57312 in /app)
2017-09-03T14:05:11.193055+00:00 app[web.1]: 2017-09-03 14:05:11.192 INFO 4 --- [ main] c.l.b.p.c.j.JavaCloudSampleApplication : No active profile set, falling back to default profiles: default
2017-09-03T14:05:11.474167+00:00 app[web.1]: 2017-09-03 14:05:11.473 INFO 4 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#62150f9e: startup da
te [Sun Sep 03 14:05:11 UTC 2017]; root of context hierarchy
2017-09-03T14:05:14.172407+00:00 app[web.1]: WARNING: An illegal reflective access operation has occurred
2017-09-03T14:05:14.172418+00:00 app[web.1]: WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (jar:file:/app/target/java-cloud-sample-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-core-4.3.10.RELEASE.jar!/) to method java.lang.Class
Loader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
2017-09-03T14:05:14.172419+00:00 app[web.1]: WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1
2017-09-03T14:05:14.172420+00:00 app[web.1]: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2017-09-03T14:05:14.172425+00:00 app[web.1]: WARNING: All illegal access operations will be denied in a future release
2017-09-03T14:05:15.430298+00:00 app[web.1]: 2017-09-03 14:05:15.430 INFO 4 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-09-03T14:05:15.451153+00:00 app[web.1]: 2017-09-03 14:05:15.450 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-09-03T14:05:15.452398+00:00 app[web.1]: 2017-09-03 14:05:15.452 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.16
2017-09-03T14:05:15.582784+00:00 app[web.1]: 2017-09-03 14:05:15.582 INFO 4 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-09-03T14:05:15.583083+00:00 app[web.1]: 2017-09-03 14:05:15.582 INFO 4 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4117 ms
2017-09-03T14:05:16.006331+00:00 app[web.1]: 2017-09-03 14:05:16.006 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-09-03T14:05:16.013268+00:00 app[web.1]: 2017-09-03 14:05:16.013 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'metricsFilter' to: [/*]
2017-09-03T14:05:16.013794+00:00 app[web.1]: 2017-09-03 14:05:16.013 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-09-03T14:05:16.013969+00:00 app[web.1]: 2017-09-03 14:05:16.013 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-09-03T14:05:16.014080+00:00 app[web.1]: 2017-09-03 14:05:16.013 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-09-03T14:05:16.014311+00:00 app[web.1]: 2017-09-03 14:05:16.014 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-09-03T14:05:16.014462+00:00 app[web.1]: 2017-09-03 14:05:16.014 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2017-09-03T14:05:16.014603+00:00 app[web.1]: 2017-09-03 14:05:16.014 INFO 4 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'applicationContextIdFilter' to: [/*]
2017-09-03T14:05:16.730294+00:00 app[web.1]: 2017-09-03 14:05:16.729 INFO 4 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#
62150f9e: startup date [Sun Sep 03 14:05:11 UTC 2017]; root of context hierarchy
2017-09-03T14:05:16.957338+00:00 app[web.1]: 2017-09-03 14:05:16.957 INFO 4 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/rest/hello]}" onto public java.lang.String com.lapots.breed.platform.cloud.javacloudsample.rest.HelloRestCon
troller.hello()
2017-09-03T14:05:16.967662+00:00 app[web.1]: 2017-09-03 14:05:16.967 INFO 4 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Objec
t>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-09-03T14:05:16.968232+00:00 app[web.1]: 2017-09-03 14:05:16.968 INFO 4 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.b
oot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-09-03T14:05:17.015875+00:00 app[web.1]: 2017-09-03 14:05:17.015 INFO 4 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestH
andler]
2017-09-03T14:05:17.015988+00:00 app[web.1]: 2017-09-03 14:05:17.015 INFO 4 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-09-03T14:05:17.073204+00:00 app[web.1]: 2017-09-03 14:05:17.072 INFO 4 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequ
estHandler]
2017-09-03T14:05:17.600843+00:00 app[web.1]: 2017-09-03 14:05:17.600 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/info || /info.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json
]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.603060+00:00 app[web.1]: 2017-09-03 14:05:17.602 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/auditevents || /auditevents.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || ap
plication/json]}" onto public org.springframework.http.ResponseEntity<?> org.springframework.boot.actuate.endpoint.mvc.AuditEventsMvcEndpoint.findByPrincipalAndAfterAndType(java.lang.String,java.util.Date,java.lang.String)
2017-09-03T14:05:17.606261+00:00 app[web.1]: 2017-09-03 14:05:17.606 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/configprops || /configprops.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || ap
plication/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.610341+00:00 app[web.1]: 2017-09-03 14:05:17.610 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/js
on]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.611621+00:00 app[web.1]: 2017-09-03 14:05:17.611 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/trace || /trace.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/js
on]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.616752+00:00 app[web.1]: 2017-09-03 14:05:17.616 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]
}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2017-09-03T14:05:17.617046+00:00 app[web.1]: 2017-09-03 14:05:17.616 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || applicatio
n/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.630560+00:00 app[web.1]: 2017-09-03 14:05:17.629 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/heapdump || /heapdump.json],methods=[GET],produces=[application/octet-stream]}" onto public void org.springf
ramework.boot.actuate.endpoint.mvc.HeapdumpMvcEndpoint.invoke(boolean,javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) throws java.io.IOException,javax.servlet.ServletException
2017-09-03T14:05:17.642704+00:00 app[web.1]: 2017-09-03 14:05:17.642 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || appl
ication/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.650903+00:00 app[web.1]: 2017-09-03 14:05:17.650 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]
}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.get(java.lang.String)
2017-09-03T14:05:17.653138+00:00 app[web.1]: 2017-09-03 14:05:17.651 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers/{name:.*}],methods=[POST],consumes=[application/vnd.spring-boot.actuator.v1+json || application/json
],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.LoggersMvcEndpoint.set(java.lang.String,java.util.Map<java.lang.String, java.lang.String>)
2017-09-03T14:05:17.654524+00:00 app[web.1]: 2017-09-03 14:05:17.653 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/loggers || /loggers.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || applicatio
n/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.657622+00:00 app[web.1]: 2017-09-03 14:05:17.655 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/mappings || /mappings.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || applicat
ion/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.663382+00:00 app[web.1]: 2017-09-03 14:05:17.658 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/dump || /dump.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json
]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.672330+00:00 app[web.1]: 2017-09-03 14:05:17.672 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" o
nto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EnvironmentMvcEndpoint.value(java.lang.String)
2017-09-03T14:05:17.683275+00:00 app[web.1]: 2017-09-03 14:05:17.683 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/env || /env.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}
" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2017-09-03T14:05:17.685550+00:00 app[web.1]: 2017-09-03 14:05:17.685 INFO 4 --- [ main] o.s.b.a.e.mvc.EndpointHandlerMapping : Mapped "{[/health || /health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/
json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
2017-09-03T14:05:17.962047+00:00 app[web.1]: 2017-09-03 14:05:17.961 INFO 4 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-09-03T14:05:17.981648+00:00 app[web.1]: 2017-09-03 14:05:17.981 INFO 4 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0
2017-09-03T14:05:18.309932+00:00 app[web.1]: 2017-09-03 14:05:18.309 INFO 4 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-09-03T14:05:18.328371+00:00 app[web.1]: 2017-09-03 14:05:18.325 INFO 4 --- [ main] c.l.b.p.c.j.JavaCloudSampleApplication : Started JavaCloudSampleApplication in 9.561 seconds (JVM running for 10.785)
2017-09-03T14:05:45.484008+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path="/" host=java-cloud-sample.herokuapp.com request_id=fe61c421-b7c6-47a5-ad20-cb78b2593c53 fwd="93.171.108.185" dyno= connect= service= status=503 bytes= pr
otocol=https
2017-09-03T14:05:50.186722+00:00 heroku[web.1]: Process running mem=514M(100.5%)
2017-09-03T14:05:50.186875+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-09-03T14:06:17.392379+00:00 heroku[web.1]: Process running mem=514M(100.5%)
2017-09-03T14:06:17.392521+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2017-09-03T14:06:35.116087+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 90 seconds of launch
2017-09-03T14:06:35.116157+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-09-03T14:06:35.322422+00:00 heroku[web.1]: Process exited with status 137
2017-09-03T14:06:35.338320+00:00 heroku[web.1]: State changed from starting to crashed
2017-09-03T14:06:36.190416+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=java-cloud-sample.herokuapp.com request_id=1b975133-4ab4-4ea0-8366-985fd34ee359 fwd="93.171.108.185" dyno= connect= service= status=503 bytes= protoco
l=https
2017-09-03T14:06:36.814442+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=java-cloud-sample.herokuapp.com request_id=04f98634-63bf-48ea-ac2e-7a43b8c52b85 fwd="93.171.108.185" dyno= connect= service= status=503 bytes= protoco
l=https
2017-09-03T14:07:00.220008+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/rest/hello" host=java-cloud-sample.herokuapp.com request_id=5b88705e-ac20-4913-818f-4aa0e9f79914 fwd="93.171.108.185" dyno= connect= service= status=503 byte
s= protocol=https
What is the problem? Why it cannot bind to $PORT?

To solve the problem I did two things.
Firstly, as it exceed 512 mb I set config var
JAVA_TOOL_OPTIONS = -Xmx300m
Second I changed slightly command line for starting the app
java $JAVA_OPTS -Dserver.port=$PORT -jar target/java-cloud-sample-0.0.1-SNAPSHOT.jar
And now it works!

Related

JAR file automatically terminates on remote Ubuntu server after a day

I have a jar file, which was built using maven (the app is spring-boot). I deployed it on a remote server using nohup java -jar app.jar command. It works for a day or so and then stops working. The logs in nohup file are not informative and I could not figure out what's the reason for that. By stops working, I mean - the application just terminates, it is not working.
Here is the output of the nohup file:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.1)
2022-02-21 06:19:32.288 INFO 74013 --- [ main] kz.iuth.platonus.demo.DemoApplication : Starting DemoApplication v0.0.1-SNAPSHOT using Java 1.8.0_131 on user-ProLiant-ML30-Gen9 with PID 74013 (/home/user/iuth_app/demo-0.0.1-SNAPSHOT.jar started by user in /home/user/iuth_app)
2022-02-21 06:19:32.290 INFO 74013 --- [ main] kz.iuth.platonus.demo.DemoApplication : No active profile set, falling back to default profiles: default
2022-02-21 06:19:32.913 INFO 74013 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2022-02-21 06:19:32.981 INFO 74013 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 60 ms. Found 11 JPA repository interfaces.
2022-02-21 06:19:33.485 INFO 74013 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9090 (http)
2022-02-21 06:19:33.497 INFO 74013 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-02-21 06:19:33.497 INFO 74013 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.55]
2022-02-21 06:19:33.545 INFO 74013 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-02-21 06:19:33.545 INFO 74013 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1209 ms
2022-02-21 06:19:33.691 INFO 74013 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2022-02-21 06:19:34.035 INFO 74013 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2022-02-21 06:19:34.074 INFO 74013 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2022-02-21 06:19:34.115 INFO 74013 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.1.Final
2022-02-21 06:19:34.249 INFO 74013 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2022-02-21 06:19:34.348 INFO 74013 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL57Dialect
2022-02-21 06:19:34.819 INFO 74013 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2022-02-21 06:19:34.826 INFO 74013 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2022-02-21 06:19:35.564 WARN 74013 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2022-02-21 06:19:36.010 INFO 74013 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9090 (http) with context path ''
2022-02-21 06:19:36.018 INFO 74013 --- [ main] kz.iuth.platonus.demo.DemoApplication : Started DemoApplication in 4.109 seconds (JVM running for 4.502)
2022-02-21 06:19:53.481 INFO 74013 --- [nio-9090-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-02-21 06:19:53.481 INFO 74013 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-02-21 06:19:53.493 INFO 74013 --- [nio-9090-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2022-02-21 06:19:58.354 WARN 74013 --- [nio-9090-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]
.....
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:540) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:895) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1722) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-embed-core-9.0.55.jar!/:na]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-9.0.55.jar!/:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]
2022-02-21 23:08:17.439 WARN 74013 --- [nio-9090-exec-7] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported]
2022-02-21 23:30:31.755 INFO 74013 --- [ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2022-02-21 23:30:31.762 INFO 74013 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2022-02-21 23:30:31.769 INFO 74013 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
I'm not sure what's the problem. Please, feel free to ask more information, If you need and I will edit.

Cant add data to databases on Spring Boot using Heroku postgres

I've been trying to get a Rest Repository up and running using Heroku. However, while the tables I'm using are being added to the datasource, I am unable to upload any rows of data.
Shows that my tables are being added to postgres datasource
I don't get any error messages or issues deploying the service, I just can't add data.
I've looked around the internet for solutions currently application.properties is a mess of different bits of code that I've copied on all the guides for how to get a database running.
#spring.h2.console.enabled=true
#spring.datasource.url=jdbc:h2:mem:testdb
#spring.datasource.driverClassName=org.h2.Driver
#spring.datasource.username=sa
#spring.datasource.password=
#spring.h2.console.settings.web-allow-others=true
#spring.main.banner-mode=off
#logging.level.org.springframework=ERROR
spring.jpa.hibernate.ddl-auto=update
#spring.datasource.initialization-mode=always
spring.datasource.platform=postgres
#spring.datasource.url=postgres://npwovtbfrmcgap:8cb0a1d61d6608e756d4340bb79926156b43c5d602580ab21884d058b7adf230#ec2-52-23-14-156.compute-1.amazonaws.com:5432/deu5uhuf0in93s
#spring.datasource.url=${JDBC_DATABASE_URL}
#spring.datasource.username=${SPRING_DATABASE_USERNAME}
#spring.datasource.password=${SPRING_DATABASE_PASSWORD}
#spring.jpa.show-sql=true
#spring.jpa.generate-ddl=true
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.datasource.url=${JDBC_DATABASE_URL}
spring.datasource.username=${JDBC_DATABASE_USERNAME}
spring.datasource.password=${JDBC_DATABASE_PASSWORD}
spring.jpa.show-sql=false
spring.jpa.generate-ddl=true
For testing I used h2 and that worked fine with no issues. Even though I've been eyeing using JDBC _DATABASE for it's easy setup, I've made a Database Configuration file.
package com.example.chess.Config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import javax.sql.DataSource;
#Configuration
public class DatabaseConfig {
#Bean
#Primary
#ConfigurationProperties(prefix = "spring.datasource")
public DataSource dataSource()
{
return new org.apache.tomcat.jdbc.pool.DataSource();
}
}
There isn't a whole lot here, but from my understanding I shouldn't need one if I'm using a JDBC Database.
Some ideas that I have...
Heroku could be forcing me to use their guide on preparing a Spring Boot App for production
https://devcenter.heroku.com/articles/preparing-a-spring-boot-app-for-production-on-heroku
I could put better #GeneratedValue typing on the code for tables I have.
package com.example.chess.Model;
import javax.persistence.*;
#Entity
public class Chat {
#GeneratedValue
#Id
#Column
private int chatID;
#Column
private String chatMsg;
public int getChatID() {
return chatID;
}
public String getChatMsg() {
return chatMsg;
}
public void setChatID(int chatID) {
this.chatID = chatID;
}
public void setChatMsg(String chatMsg) {
this.chatMsg = chatMsg;
}
}
Past that I'm not really sure what to do. Any feedback is appreciated.
Thanks for all the help, however I still havent gotten it working. I used heroku logs to find more data. I also used spring.database.platform and spring.datasource.driver-class-name. the code for application properties has been updated.
2020-02-18T02:22:38.000000+00:00 app[api]: Build succeeded
2020-02-18T02:22:41.021726+00:00 app[web.1]: 2020-02-18 02:22:41.017 INFO 4 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$28f59fce] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-02-18T02:22:41.264675+00:00 app[web.1]:
2020-02-18T02:22:41.264732+00:00 app[web.1]: . ____ _ __ _ _
2020-02-18T02:22:41.264786+00:00 app[web.1]: /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
2020-02-18T02:22:41.264849+00:00 app[web.1]: ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2020-02-18T02:22:41.264905+00:00 app[web.1]: \\/ ___)| |_)| | | | | || (_| | ) ) ) )
2020-02-18T02:22:41.264972+00:00 app[web.1]: ' |____| .__|_| |_|_| |_\__, | / / / /
2020-02-18T02:22:41.265009+00:00 app[web.1]: =========|_|==============|___/=/_/_/_/
2020-02-18T02:22:41.265886+00:00 app[web.1]: :: Spring Boot :: (v2.1.7.RELEASE)
2020-02-18T02:22:41.265938+00:00 app[web.1]:
2020-02-18T02:22:41.335856+00:00 app[web.1]: 2020-02-18 02:22:41.335 INFO 4 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2020-02-18T02:22:41.566210+00:00 app[web.1]: 2020-02-18 02:22:41.565 INFO 4 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - http://localhost:8888. Will be trying the next url if available
2020-02-18T02:22:41.566423+00:00 app[web.1]: 2020-02-18 02:22:41.566 WARN 4 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/application/default": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)
2020-02-18T02:22:41.570798+00:00 app[web.1]: 2020-02-18 02:22:41.570 INFO 4 --- [ main] com.example.chess.ChessApplication : No active profile set, falling back to default profiles: default
2020-02-18T02:22:42.945648+00:00 app[web.1]: 2020-02-18 02:22:42.943 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
2020-02-18T02:22:43.135659+00:00 app[web.1]: 2020-02-18 02:22:43.135 INFO 4 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 157ms. Found 4 repository interfaces.
2020-02-18T02:22:43.711365+00:00 app[web.1]: 2020-02-18 02:22:43.711 INFO 4 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=de70dafe-40e0-316f-93ef-ef4b324ee017
2020-02-18T02:22:43.965692+00:00 app[web.1]: 2020-02-18 02:22:43.965 INFO 4 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$cdb9cd1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-02-18T02:22:44.025903+00:00 app[web.1]: 2020-02-18 02:22:44.025 INFO 4 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$28f59fce] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2020-02-18T02:22:44.561043+00:00 app[web.1]: 2020-02-18 02:22:44.560 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 37710 (http)
2020-02-18T02:22:44.670131+00:00 app[web.1]: 2020-02-18 02:22:44.669 INFO 4 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-02-18T02:22:44.670471+00:00 app[web.1]: 2020-02-18 02:22:44.670 INFO 4 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.22]
2020-02-18T02:22:45.421352+00:00 app[web.1]: 2020-02-18 02:22:45.421 INFO 4 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-02-18T02:22:45.421626+00:00 app[web.1]: 2020-02-18 02:22:45.421 INFO 4 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3826 ms
2020-02-18T02:22:45.859027+00:00 app[web.1]: 2020-02-18 02:22:45.858 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2020-02-18T02:22:46.292693+00:00 app[web.1]: 2020-02-18 02:22:46.292 INFO 4 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2020-02-18T02:22:46.414129+00:00 app[web.1]: 2020-02-18 02:22:46.413 INFO 4 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
2020-02-18T02:22:46.414131+00:00 app[web.1]: name: default
2020-02-18T02:22:46.414131+00:00 app[web.1]: ...]
2020-02-18T02:22:46.563652+00:00 app[web.1]: 2020-02-18 02:22:46.563 INFO 4 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.3.10.Final}
2020-02-18T02:22:46.566628+00:00 app[web.1]: 2020-02-18 02:22:46.566 INFO 4 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2020-02-18T02:22:46.824490+00:00 app[web.1]: 2020-02-18 02:22:46.824 INFO 4 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2020-02-18T02:22:47.331763+00:00 app[web.1]: 2020-02-18 02:22:47.331 INFO 4 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect
2020-02-18T02:22:47.616894+00:00 app[web.1]: 2020-02-18 02:22:47.616 INFO 4 --- [ main] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000421: Disabling contextual LOB creation as hibernate.jdbc.lob.non_contextual_creation is true
2020-02-18T02:22:47.624236+00:00 app[web.1]: 2020-02-18 02:22:47.623 INFO 4 --- [ main] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType#37e4d7bb
2020-02-18T02:22:48.869877+00:00 app[web.1]: 2020-02-18 02:22:48.869 INFO 4 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-02-18T02:22:49.329464+00:00 app[web.1]: 2020-02-18 02:22:49.329 INFO 4 --- [ main] o.h.h.i.QueryTranslatorFactoryInitiator : HHH000397: Using ASTQueryTranslatorFactory
2020-02-18T02:22:50.308149+00:00 app[web.1]: 2020-02-18 02:22:50.307 INFO 4 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2020-02-18T02:22:50.411820+00:00 app[web.1]: 2020-02-18 02:22:50.409 WARN 4 --- [ main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2020-02-18T02:22:50.461378+00:00 app[web.1]: 2020-02-18 02:22:50.461 INFO 4 --- [ main] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]
2020-02-18T02:22:51.073701+00:00 heroku[web.1]: State changed from starting to up
2020-02-18T02:22:50.863588+00:00 app[web.1]: 2020-02-18 02:22:50.863 INFO 4 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 37710 (http) with context path ''
2020-02-18T02:22:50.865846+00:00 app[web.1]: 2020-02-18 02:22:50.865 INFO 4 --- [ main] com.example.chess.ChessApplication : Started ChessApplication in 12.027 seconds (JVM running for 12.976)
Try adding dialect , driver-class name and database-platform as you have commented those.
Finally fixed it. Boy do I feel dumb, the problem was in the angular frontend I was posting and getting from localhost:8080.
$http.get("http://localhost:8080/letter").then(function (response){
$scope.letter = response.data;
});
$scope.postLetter = function(letter)
{
var data = {
contactName: contactName,
email: email,
message: message
};
$http.post("http://localhost:8080/letter", JSON.stringify(data));
location.reload();
};
Thanks again for everyone who tried helping.

spring boot related issues

Spring boot issues with following code. see error below and tomcat is running fine
package com.template;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class SpringBootFreemarkerApplication {
public static void main(String[] args) {
SpringApplication.run(SpringBootFreemarkerApplication.class,
args);
}
}
package controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
#Controller
public class TestController {
#RequestMapping("/welcome")
public String hello(Model model, #RequestParam(value="name",
required=false, defaultValue="World") String name) {
model.addAttribute("name", name);
return "welcome";
}
}
"C:\Program Files\Java\jdk1.8.0_121\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.5\lib\idea_rt.jar=54267:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.1.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_121\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_121\jre\lib\rt.jar;C:\SpringBoot\Spring-boot-freemarker\target\classes;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-starter-freemarker\1.5.6.RELEASE\spring-boot-starter-freemarker-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-starter\1.5.6.RELEASE\spring-boot-starter-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot\1.5.6.RELEASE\spring-boot-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\1.5.6.RELEASE\spring-boot-autoconfigure-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-starter-logging\1.5.6.RELEASE\spring-boot-starter-logging-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\ch\qos\logback\logback-classic\1.1.11\logback-classic-1.1.11.jar;C:\Users\shekhar\.m2\repository\ch\qos\logback\logback-core\1.1.11\logback-core-1.1.11.jar;C:\Users\shekhar\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\shekhar\.m2\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;C:\Users\shekhar\.m2\repository\org\slf4j\log4j-over-slf4j\1.7.25\log4j-over-slf4j-1.7.25.jar;C:\Users\shekhar\.m2\repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;C:\Users\shekhar\.m2\repository\org\freemarker\freemarker\2.3.26-incubating\freemarker-2.3.26-incubating.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-context-support\4.3.10.RELEASE\spring-context-support-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-beans\4.3.10.RELEASE\spring-beans-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-context\4.3.10.RELEASE\spring-context-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-starter-web\1.5.6.RELEASE\spring-boot-starter-web-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\1.5.6.RELEASE\spring-boot-starter-tomcat-1.5.6.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.16\tomcat-embed-core-8.5.16.jar;C:\Users\shekhar\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.16\tomcat-embed-el-8.5.16.jar;C:\Users\shekhar\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.16\tomcat-embed-websocket-8.5.16.jar;C:\Users\shekhar\.m2\repository\org\hibernate\hibernate-validator\5.3.5.Final\hibernate-validator-5.3.5.Final.jar;C:\Users\shekhar\.m2\repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;C:\Users\shekhar\.m2\repository\org\jboss\logging\jboss-logging\3.3.1.Final\jboss-logging-3.3.1.Final.jar;C:\Users\shekhar\.m2\repository\com\fasterxml\classmate\1.3.3\classmate-1.3.3.jar;C:\Users\shekhar\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.8.9\jackson-databind-2.8.9.jar;C:\Users\shekhar\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.8.0\jackson-annotations-2.8.0.jar;C:\Users\shekhar\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.8.9\jackson-core-2.8.9.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-web\4.3.10.RELEASE\spring-web-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-aop\4.3.10.RELEASE\spring-aop-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-webmvc\4.3.10.RELEASE\spring-webmvc-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-expression\4.3.10.RELEASE\spring-expression-4.3.10.RELEASE.jar;C:\Users\shekhar\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\shekhar\.m2\repository\org\springframework\spring-core\4.3.10.RELEASE\spring-core-4.3.10.RELEASE.jar" com.template.SpringBootFreemarkerApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.6.RELEASE)
2017-07-30 15:20:08.005 INFO 7612 --- [ main] c.t.SpringBootFreemarkerApplication : Starting SpringBootFreemarkerApplication on DESKTOP-9LIAED5 with PID 7612 (C:\SpringBoot\Spring-boot-freemarker\target\classes started by shekhar in C:\SpringBoot\Spring-boot-freemarker)
2017-07-30 15:20:08.008 INFO 7612 --- [ main] c.t.SpringBootFreemarkerApplication : No active profile set, falling back to default profiles: default
2017-07-30 15:20:08.074 INFO 7612 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3bd94634: startup date [Sun Jul 30 15:20:08 IST 2017]; root of context hierarchy
2017-07-30 15:20:10.322 INFO 7612 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-07-30 15:20:10.333 INFO 7612 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-07-30 15:20:10.334 INFO 7612 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.16
2017-07-30 15:20:10.472 INFO 7612 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-07-30 15:20:10.472 INFO 7612 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2398 ms
2017-07-30 15:20:10.788 INFO 7612 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-07-30 15:20:10.792 INFO 7612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-07-30 15:20:10.792 INFO 7612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-07-30 15:20:10.793 INFO 7612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-07-30 15:20:10.793 INFO 7612 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-07-30 15:20:11.221 INFO 7612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3bd94634: startup date [Sun Jul 30 15:20:08 IST 2017]; root of context hierarchy
2017-07-30 15:20:11.299 INFO 7612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/welcome]}" onto public java.lang.String com.template.controller.TestController.hello(org.springframework.ui.Model,java.lang.String)
2017-07-30 15:20:11.302 INFO 7612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-07-30 15:20:11.302 INFO 7612 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-07-30 15:20:11.337 INFO 7612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-30 15:20:11.337 INFO 7612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-30 15:20:11.374 INFO 7612 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-07-30 15:20:11.626 INFO 7612 --- [ main] o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added to FreeMarker configuration
2017-07-30 15:20:11.727 INFO 7612 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-07-30 15:20:11.790 INFO 7612 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-07-30 15:20:11.795 INFO 7612 --- [ main] c.t.SpringBootFreemarkerApplication : Started SpringBootFreemarkerApplication in 4.222 seconds (JVM running for 5.046)
Your controller is not scanned by the default component scan that Spring Boot provides. By default Spring boot starts from the package that contains the "main" class - the one annotated with #SpringBootApplication and also scans all of it's sub packages.
Your main class is in package com.template; but the controller is in package controller;. Move the controller in a package named package com.template.controller;
Since you are using FreeMarker Template with spring boot, I would suggest you to move your welcome.ftl template from this location src/webapp/welcome.ftl to this src/main/resources/templates/welcome.ftl and then restart your application and hit http://localhost:8080/welcome

Spring Boot Application is starting up from a JUnit test but unable to access through URL

I have a JUnit Test that starts my spring boot appcliation (Application.java).
#RunWith(SpringRunner.class)
#SpringBootTest(classes = Application.class)
public class AppclaitionTest {
#Test
public void contextLoads(){
Application.main(new String[]{});
}
}
If I run the JUnit test, Application is successfully starting up, but not accessible through url
Application Logs:
2017-06-16 12:18:07.918 INFO 207028 --- [ main] com.chandu.test.AppclaitionTest : Started AppclaitionTest in 1.927 seconds (JVM running for 2.458)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.3.RELEASE)
2017-06-16 12:18:08.012 INFO 207028 --- [ main] com.test.app.Application : Starting Application on IVL-WS39 with PID 207028 (started by Bhanuchandar.Challa in D:\Jars\SpringJDBCMySQL)
2017-06-16 12:18:08.012 INFO 207028 --- [ main] com.test.app.Application : No active profile set, falling back to default profiles: default
2017-06-16 12:18:08.012 INFO 207028 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3f1ddac2: startup date [Fri Jun 16 12:18:08 IST 2017]; root of context hierarchy
2017-06-16 12:18:08.402 INFO 207028 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-06-16 12:18:08.417 INFO 207028 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2017-06-16 12:18:08.417 INFO 207028 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.14
2017-06-16 12:18:08.526 INFO 207028 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-06-16 12:18:08.526 INFO 207028 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 514 ms
2017-06-16 12:18:08.636 INFO 207028 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-06-16 12:18:08.636 INFO 207028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-06-16 12:18:08.636 INFO 207028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-06-16 12:18:08.636 INFO 207028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-06-16 12:18:08.636 INFO 207028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-06-16 12:18:08.933 INFO 207028 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext#3f1ddac2: startup date [Fri Jun 16 12:18:08 IST 2017]; root of context hierarchy
2017-06-16 12:18:08.933 INFO 207028 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/getRowCount]}" onto public java.lang.Integer com.test.app.controller.TestController.getRowCount(java.lang.String)
2017-06-16 12:18:08.949 INFO 207028 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/process]}" onto public java.lang.String com.test.app.controller.TestController.processRequest()
2017-06-16 12:18:08.949 INFO 207028 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-06-16 12:18:08.949 INFO 207028 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-06-16 12:18:08.964 INFO 207028 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-06-16 12:18:08.964 INFO 207028 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-06-16 12:18:08.980 INFO 207028 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-06-16 12:18:09.105 INFO 207028 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-06-16 12:18:09.151 INFO 207028 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-06-16 12:18:09.151 INFO 207028 --- [ main] com.test.app.Application : Started Application in 1.186 seconds (JVM running for 3.689)
When I tried to access the application through url 'http://localhost:8080/process', It says Site can't be reached.
Why would you do such thing? This should be a unit test and the flow of the test should be the following:
Start the application -> Call your controller endpoint -> assert that a specific text/element on that page is present -> Shut down the application.
Start the application : #RunWith(SpringRunner.class) doing this for you, no need to start is manually.
Shut down the application : At the end of your test class Spring boot does this for you (That's why you cant access your app in the browser)
For further help please see my answer here: How to test (rest) enpoints
By default, in #SpringBootTest annotation the field webEnvironment is set to WebEnvironment.MOCK
Therefore, Tomcat does not start.
You can set this field to WebEnvironment.DEFINED_PORT/RANDOM_PORT.
After this, Tomcat will be running.
#SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class MyTestClass {
...
...
...
}

install spring boot CLI in windows 7

I would like to set up a dev environment on my Windows 7 machine so i can create a spring-boot application. However, i'm having a hard time installing Spring-boot on windows.
This is what i have done so far:
-Downloaded spring-boot CLI zip package and unzipped in C drive
-JAVA_HOME variable set to c:\Program Files (x86)\Java\jdk1.6.0_14
-SPRING_HOME variable set to C:\spring-1.3.0.BUILD-SNAPSHOT
-Added SPRING_HOME/bin to PATH environment variable
It says to add symlink to auto-completion script but i do not know how to do that. Not surprisingly when i test installation with "spring --version" command, it fails.
Anybody has done this before?
Thanks!
Instructions for setup are bit misleading for path setup.
For Windows, Environment variables section, need use %SPRING_HOME%\bin referencing in place of SPRING_HOME/bin for the system to pick up SPRING_HOME environment variable.
Where SPRING_HOME is an environment variable for specifying path to the spring boot directory.
E.g. :- C:\Program Files\Spring\spring-1.2.7.RELEASE
Note: bin folder is not included in the SPRING_HOME.
I was able to get it up, here are screen grabs of process.
Alternatively you can have the path setup directly without SPRING_HOME, just append the environment variable path with directory path of your "spring.bat" file C:\Program Files\Spring\spring-1.2.7.RELEASE\bin;.
Windows looks in the current directory before searching the path. So, when you're in the bin directory it sees the spring command there and does not look at the path.
1.MANUALLY INSTALLING THE SPRING BOOT CLI
spring-boot-cli-2.0.0.M1-bin.zip is installed.
2.Extract spring-boot-cli-2.0.0.M1-bin.zip.
3.After spring-2.0.0.M1 extractd.
4. Direct command prompt
--------------------------
C:\Users\nepl>spring --version
'spring' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\nepl>E:
E:\>cd Nagarjuna
E:\Nagarjuna>cd "spring applications"
E:\Nagarjuna\spring applications>cd spring-2.0.0.M1
E:\Nagarjuna\spring applications\spring-2.0.0.M1>cd bin
E:\Nagarjuna\spring applications\spring-2.0.0.M1\bin>spring -- version
'--' is not a valid command. See 'help'.
E:\Nagarjuna\spring applications\spring-2.0.0.M1\bin>spring --version
Spring CLI v2.0.0.M1
E:\Nagarjuna\spring applications\spring-2.0.0.M1\bin>spring --help
E:\Nagarjuna\spring applications\spring-2.0.0.M1\bin>spring run HelloWorld.groov
y
Resolving dependencies......................................................
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.M1)
2017-12-15 15:36:07.949 INFO 3464 --- [ runner-0] o.s.boot.SpringApplicat
ion : Starting application on nw0188 with PID 3464 (started by nep
l in E:\Nagarjuna\spring applications\spring-2.0.0.M1\bin)
2017-12-15 15:36:07.996 INFO 3464 --- [ runner-0] o.s.boot.SpringApplicat
ion : No active profile set, falling back to default profiles: def
ault
2017-12-15 15:36:08.689 INFO 3464 --- [ runner-0] ConfigServletWebServerA
pplicationContext : Refreshing org.springframework.boot.web.servlet.context.Anno
tationConfigServletWebServerApplicationContext#48cd5e87: startup date [Fri Dec 1
5 15:36:08 IST 2017]; root of context hierarchy
2017-12-15 15:36:11.575 INFO 3464 --- [ runner-0] o.s.b.w.embedded.tomcat
.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2017-12-15 15:36:11.606 INFO 3464 --- [ runner-0] o.apache.catalina.core.
StandardService : Starting service [Tomcat]
2017-12-15 15:36:11.606 INFO 3464 --- [ runner-0] org.apache.catalina.cor
e.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.15
2017-12-15 15:36:12.285 INFO 3464 --- [ost-startStop-1] org.apache.catalina.loa
der.WebappLoader : Unknown loader org.springframework.boot.cli.compiler.Extende
dGroovyClassLoader$DefaultScopeParentClassLoader#526a6c66 class org.springframew
ork.boot.cli.compiler.ExtendedGroovyClassLoader$DefaultScopeParentClassLoader
2017-12-15 15:36:12.378 INFO 3464 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[loc
alhost].[/] : Initializing Spring embedded WebApplicationContext
2017-12-15 15:36:12.378 INFO 3464 --- [ost-startStop-1] o.s.web.context.Context
Loader : Root WebApplicationContext: initialization completed in 3689
ms
2017-12-15 15:36:12.550 INFO 3464 --- [ost-startStop-1] o.s.b.w.servlet.Servlet
RegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-12-15 15:36:12.550 INFO 3464 --- [ost-startStop-1] o.s.b.w.servlet.FilterR
egistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-12-15 15:36:12.550 INFO 3464 --- [ost-startStop-1] o.s.b.w.servlet.FilterR
egistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-12-15 15:36:12.550 INFO 3464 --- [ost-startStop-1] o.s.b.w.servlet.FilterR
egistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-12-15 15:36:12.550 INFO 3464 --- [ost-startStop-1] o.s.b.w.servlet.FilterR
egistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-12-15 15:36:13.070 INFO 3464 --- [ runner-0] s.w.s.m.m.a.RequestMapp
ingHandlerAdapter : Looking for #ControllerAdvice: org.springframework.boot.web.
servlet.context.AnnotationConfigServletWebServerApplicationContext#48cd5e87: sta
rtup date [Fri Dec 15 15:36:08 IST 2017]; root of context hierarchy
2017-12-15 15:36:13.200 INFO 3464 --- [ runner-0] s.w.s.m.m.a.RequestMapp
ingHandlerMapping : Mapped "{[/]}" onto public java.util.Map HelloWorld.home()
2017-12-15 15:36:13.209 INFO 3464 --- [ runner-0] s.w.s.m.m.a.RequestMapp
ingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.Res
ponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframewo
rk.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet
.http.HttpServletRequest)
2017-12-15 15:36:13.209 INFO 3464 --- [ runner-0] s.w.s.m.m.a.RequestMapp
ingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.spr
ingframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web
.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequ
est,javax.servlet.http.HttpServletResponse)
2017-12-15 15:36:13.242 INFO 3464 --- [ runner-0] o.s.w.s.handler.SimpleU
rlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class or
g.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-15 15:36:13.242 INFO 3464 --- [ runner-0] o.s.w.s.handler.SimpleU
rlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.spring
framework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-15 15:36:13.289 INFO 3464 --- [ runner-0] o.s.w.s.handler.SimpleU
rlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [clas
s org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-15 15:36:13.976 INFO 3464 --- [ runner-0] o.s.j.e.a.AnnotationMBe
anExporter : Registering beans for JMX exposure on startup
2017-12-15 15:36:14.170 INFO 3464 --- [ runner-0] o.s.b.w.embedded.tomcat
.TomcatWebServer : Tomcat started on port(s): 8080 (http)
2017-12-15 15:36:14.175 INFO 3464 --- [ runner-0] o.s.boot.SpringApplicat
ion : Started application in 8.06 seconds (JVM running for 77.714)
2017-12-15 15:37:42.225 INFO 3464 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[loc
alhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2017-12-15 15:37:42.226 INFO 3464 --- [nio-8080-exec-1] o.s.web.servlet.Dispatc
herServlet : FrameworkServlet 'dispatcherServlet': initialization started
2017-12-15 15:37:42.249 INFO 3464 --- [nio-8080-exec-1] o.s.web.servlet.Dispatc
herServlet : FrameworkServlet 'dispatcherServlet': initialization complet
ed in 23 ms

Categories

Resources