run application就会自动停止server

run application就会自动停止server

问题描述:

为什么run application就会自动停止server了呢?我是按着视频一步步来的

相关代码:

Jan 15, 2021 10:57:30 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Tomcat]
Jan 15, 2021 10:57:30 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet engine: [Apache Tomcat/9.0.19]
Jan 15, 2021 10:57:30 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring embedded WebApplicationContext
Jan 15, 2021 10:57:30 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service [Tomcat]

Process finished with exit code 1


正在回答 回答被采纳积分+1

登陆购买课程后可参与讨论,去登陆

3回答
提问者 Elsa20 2021-01-17 03:27:35

原来是@Service没加。。。都没提醒 只能一行一行代码debug

提问者 Elsa20 2021-01-17 00:49:04

说错了 全部的log是这样的

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

 .   ____          _            __ _ _

 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

  '  |____| .__|_| |_|_| |_\__, | / / / /

 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::        (v2.1.5.RELEASE)


Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardService startInternal

INFO: Starting service [Tomcat]

Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardEngine startInternal

INFO: Starting Servlet engine: [Apache Tomcat/9.0.19]

Jan 16, 2021 11:43:42 AM org.apache.catalina.core.ApplicationContext log

INFO: Initializing Spring embedded WebApplicationContext

Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardService stopInternal

INFO: Stopping service [Tomcat]


Process finished with exit code 1


风间影月 2021-01-16 12:33:16

有毒吧。。是不是环境问题。重新创建一个最简单的工程试试看。

  • 提问者 Elsa20 #1

    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

    SLF4J: Defaulting to no-operation (NOP) logger implementation

    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

    还有这部分错

    2021-01-17 00:34:19
  • 提问者 Elsa20 #2

    全部的log如下

    log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).

    log4j:WARN Please initialize the log4j system properly.

    log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.


      .   ____          _            __ _ _

     /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \

    ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

     \\/  ___)| |_)| | | | | || (_| |  ) ) ) )

      '  |____| .__|_| |_|_| |_\__, | / / / /

     =========|_|==============|___/=/_/_/_/

     :: Spring Boot ::        (v2.1.5.RELEASE)


    Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardService startInternal

    INFO: Starting service [Tomcat]

    Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardEngine startInternal

    INFO: Starting Servlet engine: [Apache Tomcat/9.0.19]

    Jan 16, 2021 11:43:42 AM org.apache.catalina.core.ApplicationContext log

    INFO: Initializing Spring embedded WebApplicationContext

    Jan 16, 2021 11:43:42 AM org.apache.catalina.core.StandardService stopInternal

    INFO: Stopping service [Tomcat]


    Process finished with exit code 1


    2021-01-17 00:46:54
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师