SringBoot启动报日志配置错误

Easter79
• 阅读 471

最近在启动项目的时候,报错,报错的原因是springBoot日志配置文件不对。

由于自己是刚接触springboot,是同事帮忙解决的,自己非常感谢!

先总结如下:

1.首先,找到logback-spring.xml配置文件

1     <springProperty scope="context" name="springAppName" source="spring.application.name"/>
2    <!-- <springProperty scope="context" name="logging.path" source="logging.path" defaultValue="/Users/admin/project/log/ "/>-->
3     <springProperty scope="context" name="logging.path" source="logging.path" defaultValue="/apache-tomcat-8.5.46/bin/logs"/>

2.改动

defaultValue="/apache-tomcat-8.5.46/bin/logs"

注意:不要再引用idea自带的tomcat了,用自己本地的tomcat.

3.如果你是新下载的tomcat

需要将tomcat的conf目录下的server.xml文件加上uirEncoding="utf-8";

4.这样再启动的时候还是会报错

解决:自己:

SringBoot启动报日志配置错误

5.项目就能完美启动了。

点赞
收藏
评论区
推荐文章
Easter79 Easter79
2年前
springboot设置日志级别时报错
配置springboot日志,输出级别为info,运行时报错:Causedby:org.springframework.boot.context.properties.bind.BindException:Failedtobindpropertiesunder'logging.level'tojava.util.Map<jav
Easter79 Easter79
2年前
tidb集群某个节点报错之:node_exporter
今天启动集群tidb时出现一个错误,是某个tikv节点报错:node\_exporter9100.service failed一个节点的问题会导致整个集群启动失败。去此节点下的日志文件中查找,发现没有什么报错原因。无奈此时只能去系统日志中查看发生了什么问题果然发现了问题Jan1615:35:05ip1723126133
Easter79 Easter79
2年前
springboot+vue 登录页面(一)
首先了解的技术点是:后台:springboot,mybatis,mybatis逆向工程,mysql,日志前端:nodejs,npm,cnpm,vue,vuecli,webpack,elementui,router,axios开发工具:idea,webstorm该项目前端使用的是vue,目的是实现前后端分离后台:1.选择spr
Easter79 Easter79
2年前
The following classes could not be excluded because they are not auto
在Springboot启动项目的时候,出现如下错误java.lang.IllegalStateException:Thefollowingclassescouldnotbeexcludedbecausetheyarenotautoconfigurationclasses:org.springframewo
Stella981 Stella981
2年前
SpringBoot整合kafka报could not be established. Broker may not be available.
SpringBoot整合kafka报couldnotbeestablished.Brokermaynotbeavailable.报错日志AdminClientclientIda
Stella981 Stella981
2年前
Spring boot 配置文件,配置注解详解 (properties 和yml )
从其他框架来看我们都有自己的配置文件,hibernate有hbm,mybatis有properties,同样,Springboot也有全局配置文件。Springboot使用一个全局的配置文件,而且配置文件的名字是固定的。有两种application.propertiesapplication.yml spring
Easter79 Easter79
2年前
SpringBoot整合kafka报could not be established. Broker may not be available.
SpringBoot整合kafka报couldnotbeestablished.Brokermaynotbeavailable.报错日志AdminClientclientIda
Stella981 Stella981
2年前
Nginx 报错 504 Gateway Time
报错信息504GatewayTimeout原因是程序执行时间过长,导致请求超时。解决方法首先,尽可能地优化程序代码的执行时间。其次,修改配置文件。修改php.ini配置文件。max_execution_time600修改nginx.conf配置文件。
Easter79 Easter79
2年前
SpringBoot2.0启动报错
SpringBoot2.0.1启动用idea启动可以正常运行,但是mvn编译后启动失败报错日志如下2018041310:18:58.843mainWARNo.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContextAbstractApplicationCo
Stella981 Stella981
2年前
SpringBoot2.0启动报错
SpringBoot2.0.1启动用idea启动可以正常运行,但是mvn编译后启动失败报错日志如下2018041310:18:58.843mainWARNo.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContextAbstractApplicationCo
Easter79
Easter79
Lv1
今生可爱与温柔,每一样都不能少。
文章
2.8k
粉丝
5
获赞
1.2k