我已经使用 Maven 创建了 Spring Boot 应用程序。我为应用程序构建了一个可执行 jar,尝试使用以下命令在 EC2 实例免费层窗口上运行它
java -jar com-spring-boot-apps-0.0.1-SNAPSHOT.jar --server.port=8181 -Xdebug
有些应用程序没有运行,它存在于控制台上的以下日志中。
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.3.RELEASE)
2018-07-11 13:55:50.762 INFO 2784 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2018-07-11 13:55:50.768 INFO 2784 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-07-11 13:55:50.800 INFO 2784 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : Loaded APR based Apache Tomcat Native library [1.2.17] using APR version [1.6.3].
2018-07-11 13:55:50.803 INFO 2784 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
2018-07-11 13:55:50.805 INFO 2784 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
2018-07-11 13:55:52.060 INFO 2784 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : OpenSSL successfully initialized [OpenSSL 1.0.2o 27 Mar 2018]
2018-07-11 13:55:52.402 INFO 2784 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2018-07-11 13:55:52.532 INFO 2784 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
例外 :-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'regionProvider': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cloud.aws.core.region.StaticRegionProvider]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: The region 'ap-south-1a' is not a valid region!