我遇到的问题是项目中使用java_websocket的WebSocketClient,由于性能要求,需要再Controller直接继承WebSocketClient,

在项目启动过程中调试进入springboot框架,大概意思说onClose被识别为内部方法,造循环依赖等问题,具体没去深究,相关错误关键字如下

Eagerly caching bean to allow for resolving potential circular references

Invalid destruction signature

@Controller
@Slf4j
public class ASR2Controller extends WebSocketClient { static String asrUrl = "ws://xxx.yyy.zzz.111:8888/client/ws/speech?content-type=content-type=audio/x-raw,+layout=(string)interleaved,+rate(int)8000,+format=(string)S16LE,+channels=(int)1"; public ConcurrentLinkedQueue<ASRRecognizedResponse> recognized = new ConcurrentLinkedQueue<ASRRecognizedResponse>();
public ConcurrentLinkedQueue<ASRRecognizedResponse> cached = new ConcurrentLinkedQueue<ASRRecognizedResponse>(); public ASR2Controller() throws URISyntaxException { this(new URI(asrUrl));
} public ASR2Controller(URI serverUri) {
super(serverUri,new Draft_6455());
}

故障排除思路:

降低日志调试级别到info,甚至是debug,trace让其输出更多的日志,如果有能力,追踪框架或者tomcat容器最好不过。

本文最终解决办法:

编译成jar文件运行,然后控制台就出现错误日志了。

mvn package -Dmaven.test.skip=true
java -jar web-01.jar

Error starting ApplicationContext. To display the conditions report re-run yourapplication with 'debug' enabled.
2019-08-24 08:11:14.037 ERROR 5424 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***************************
APPLICATION FAILED TO START
*************************** Description: Field executor in com.xxx.open.service.impl.TTSConverter required a bean of type 'java.util.concurrent.ExecutorService' that could not be found. Action: Consider defining a bean of type 'java.util.concurrent.ExecutorService' in yourconfiguration.

===============================后续解决方法=======================================

后来和同事交流他推荐我使用logback,logback这个框架比较优秀,很早之前用过,大家可以自行搜索一下。

对于日志配置好奇的看官可以打开这个类看看

org.springframework.boot.context.logging.LoggingApplicationListener

修改yaml(application.yml)中的日志级别增加配置文件解决问题。

application.yml

logging:
level:
root: debug
path: C:\\logs

logback-spring.xml

<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<contextName>default</contextName>
 <springProperty scope="context" name="logLevel" source="log.level"/>
    <springProperty scope="context" name="logPath" source="log.path"/>
    <springProperty scope="context" name="applicationName" source="spring.application.name"/>
<!--输出到控制台-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>${logLevel}</level>
</filter>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--输出到文件-->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${logging.path}/${applicationName}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${logPath}/${applicationName}/${applicationName}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<!-- keep 30 days' worth of history capped at 3GB total size -->
<maxHistory>30</maxHistory>
<maxFileSize>100MB</maxFileSize>
<totalSizeCap>30GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender> <root level="${logLevel}">
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>
</configuration>

Spring Boot启动的报错 Stopping service [Tomcat]的更多相关文章

  1. spring boot 启动遇到报错:Failed to configure a DataSource

    spring  boot 启动遇到报错,具体如下 Description: Failed to configure a DataSource: 'url' attribute is not speci ...

  2. spring boot 启动数据库报错(Exception during pool initialization.)

    2018-06-27 14:12:28.804 ERROR 14312 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariP ...

  3. spring boot中连接数据库报错500(mybatis)

    spring boot中连接数据库报错500(mybatis) pom.xml中的依赖 <!-- 集成mybatis--> <dependency> <groupId&g ...

  4. spring boot 整合kafka 报错 Exception thrown when sending a message with key='null' and payload=JSON to topic proccess_trading_end: TimeoutException: Failed to update metadata after 60000 ms.

    org.springframework.kafka.support.LoggingProducerListener- Exception thrown when sending a message w ...

  5. Spring boot临时文件目录报错

    基本的错误信息如下: 2018-03-05 at 15:12:03 CST ERROR org.apache.juli.logging.DirectJDKLog 181 log - Servlet.s ...

  6. 【spring boot Mybatis】报错:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.interview.dao.UserMapper.add

    报错如下: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.newhope.i ...

  7. Spring Boot整合Swagger报错:"this.condition" is null

    前段时间看到群里有吐槽swagger整合问题,当时没仔细看,总以为是姿势不对. 这两天正好自己升级Spring Boot版本,然后突然出现了这样的一个错误: Caused by: java.lang. ...

  8. Spring Boot整合Mybatis报错InstantiationException: tk.mybatis.mapper.provider.base.BaseSelectProvider

    Spring Boot整合Mybatis时一直报错 后来发现原来主配置类上的MapperScan导错了包 由于我使用了通用Mapper,所以应该导入通用mapper这个包

  9. Spring Boot配置FastJson报错'Content-Type' cannot contain wildcard type '*'

    升级到最新版本的fastjson以后报的错,查了一下资料,发现 fastjson从1.1.41升级到1.2.28之后,请求报错:json java.lang.IllegalArgumentExcept ...

随机推荐

  1. okhttp拦截器之CacheInterceptor解析

    在上一次[https://www.cnblogs.com/webor2006/p/9150658.html]了解了缓存的存与取的细节之后,接下来就可以分析一下OkHttp的缓存拦截器啦: OkHttp ...

  2. HashMap源码分析二

    jdk1.2中HashMap的源码和jdk1.3中HashMap的源码基本上没变.在上篇中,我纠结的那个11和101的问题,在这边中找到答案了.   jdk1.2   public HashMap() ...

  3. JavaScript中定义类的方式详解

    本文实例讲述了JavaScript中定义类的方式.分享给大家供大家参考,具体如下: Javascript本身并不支持面向对象,它没有访问控制符,它没有定义类的关键字class,它没有支持继承的exte ...

  4. 服务器上的UID按钮

    定位用的,比如你机柜上有很多台机器,你在前面按下UID灯,机器后面也有一个UID灯会亮起来,这样当你到后面去的时候你就知道刚才在前面看的是哪一台,另外,有人通过ILO远程端口连接到你的服务器的时候,U ...

  5. ActiveMQ初步安装使用(一)

    ActiveMQ 的官网 : http://activemq.apache.org ActiveMQ 扩展出: API 接受发送 MQ 的高可用 MQ 的集群容错配置 MQ 的持久化 延时发送 签收机 ...

  6. 【2-sat】8.14B. 黑心老板

    2-sat 只写过板子 题目大意 有一个长度为$k$取值只有01的序列,现在$n$个人每人下注三个位置,请构造一个序列使每个人最多猜对一个位置 $k\le 5000,n \le 10000$ 题目分析 ...

  7. centos7编译安装PHP7已经把你逼到去安定医院看门诊的地步?请看此文

    本文援引自https://www.cnblogs.com/lamp01/p/10101659.html,亲测可行,特此鸣谢 地球上总有一群人是如此深爱PHP,但无奈的是编译安装的过程化特性,导致各种b ...

  8. @WebFilter 的使用及采坑

    @WebFilter@WebFilter 用于将一个类声明为过滤器,该注解将会在部署时被容器处理,容器将根据具体的属性配置将相应的类部署为过滤器.该注解具有下表给出的一些常用属性 ( 以下所有属性均为 ...

  9. nginx 之 root和alias

    转载:  https://www.jianshu.com/p/4be0d5882ec5 https://blog.csdn.net/Erica_1230/article/details/7855311 ...

  10. 在 CentOS 7 上安装 RabbitMQ

    RabbitMQ 服务器在安装之前需要安装 erlang. 最新版本的 RabbitMQ 3.8.0 需要 Erlang 21.3 以上的版本支持. 在这里,我们需要在你的 CentOS 中安装 Er ...