请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

springboot配置logback,启动时main方法中报错

老师,我配置logback时报错:

16:06:41,176 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@32:19 - RuntimeException in Action for tag [encoder] java.lang.NumberFormatException: For input string: "{"
at java.lang.NumberFormatException: For input string: "{"
at at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)

报错的位置是springboot的启动类中的: SpringApplication.run(StartApp.class, args);这个一行

@SpringBootApplication
@EnableScheduling //开启定时任务
@EnableAsync //开启异步任务
public class StartApp {
public static void main(String[] args) {
SpringApplication.run(StartApp.class, args);
}
}

百度了很久,也没有类似问题的,清帮看看啥原因导致

正在回答

1回答

同学好,感觉是版本的问题,可以先和教程版本对齐?其次我我看到是标签encoder的数字格式化的问题,具体可以参照下面链接试试

https://blog.csdn.net/wxj123465/article/details/81839109


0 回复 有任何疑惑可以回复我~
  • 提问者 sxdtyzg #1
    多谢老师,确实是版本问题,我默认使用最新的springboot 2.0.5报错,改成1.5就没问题了。
    回复 有任何疑惑可以回复我~ 2018-09-25 10:42:30
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号