springboot 配置logback-spring.xml 无法引用application.yml 中的配置 60C

图片说明图片说明

ERROR in ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP@48eefed5 - maxFileSize property is mandatory.
at org.springframework.boot.logging.logback.LogbackLoggingSystem.loadConfiguration(LogbackLoggingSystem.java:169)
at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithConventions(AbstractLoggingSystem.java:80)
at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:60)
at org.springframework.boot.logging.logback.LogbackLoggingSystem.initialize(LogbackLoggingSystem.java:118)
at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:313)
at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:288)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:246)
at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:223)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:208)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:104)
at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:70)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
at qdj.open.sdk.OpenSdkApplication.main(OpenSdkApplication.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)

1个回答

weixin_36837739
weixin_36837739 我的文件名也是logback-spring.xml 可是还是取不到 所以才奇怪的
大约 2 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问

相似问题

2
项目打的jar包,在linux中启动,卡在一半.不运行下去了.
2
spring boot在idea上面创建和导入别人的demo,运行主函数报这个错
1
springBoot整合mybatis时的错,求助!
2
logback报错,请大家帮一下忙
0
springboot配置好了logback之后,项目启动时只打印logback配置信息,打印完成后项目就停止运行
1
maven插件jetty:run运行项目一直失败显示
0
SSM项目pom.xml引用jar包爆红 kaptcha.wso2 就是他
1
springboot 配置多库之后,mybatis在控制台不打印sql语句了
3
SpringBoot RedisTemplate打包后找不到类
1
springboot使用log4j启动报错,去除重复包则报以下找不到log4j错误,不去重则报包重复错误,请指教
6
遇到一个 Bug,不会解决,有没有大佬来帮个忙!!!
4
spring 整合 redis 报错
1
springmvc视图解析器的prefix一定要配成全路径才能找到是为什么?
2
ssm项目的问题 Servlet.init() for servlet [spring-dispatcher] threw exception
2
spring boot 运行出错了 Application failed to start with classpath?
2
求解 FLINK 集群 Standalone 模式 高可用部署无法启动。
1
flink搭建standalone模式集群,jobmanager会自动挂掉,只有一直刷的warn日志
1
部署到服务器上报了sf4j的问题,看日志上启动起来了,但是用ip访问不了
1
已经依赖Ribbon的jar包,但是@LoadBalanced还是标红报错不能使用, 为什么?
1
No provider available from registry ip for service com.zys.store.service.api.HelloServiceApi:1.0.0 on consumer ip use dubbo version 2.6.2