springboot通过jar包启动中文日志乱码问题及解决

这篇文章主要介绍了springboot通过jar包启动中文日志乱码问题及解决方案,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教

2023年4月21日 01:18
636
0
Error creating bean with name 'serverEndpointExporter' defined in class path

出现这个错的原因是在部署项目的时候,项目中含有websocket的@ServerEndpoint注解的时候,如果项目是springboot项目,去除内置tomcat的时候会把websocket的包也给删除掉,所以需要手动加上.加上这个包,然后再打war包,部署到linux的tomcat下就没问题了. 相关解决方案参考: https://blog.csdn.net/kxj19980524/article/details/88751114 https://www.cnblogs.com/jiduoduo/p/14902967.html https://blog.csdn.net/qq_27101653/article/details/85072241

2023年3月30日 23:01
474
0
SpringMVC接收请求参数

1.@PathVariable 全称是url占位符 @GetMapping("/pathVariable2/{id}") public String pathVariable2(@PathVariable(value = "id") String id){ return id; } 调用:http://localhost:8082/pathVariable2/2 2.传递字符串参数 -1 不带注解 @GetMapping("/requestParam") public String requestParam(String userName,String age){ return userName+":xxx:"+age; } 1)http://localhost:8082/requestParam 返回 null:xxx:null 2)http://localhost:8082/requestParam?userName=zhangsan 返回 zhangsan:xxx:null 3)htt

2023年3月27日 22:37
642
0
Unable to find a single main class from the following candidates [cn.CommunityApplication, cn.xxx.xxx.CommunityApplication]

今天maven打包工程,突然报异常了,真的好奇怪 [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project zhishishequ: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find a single main class from the following candidates [cn.CommunityApplication, cn.xxx.xxx.CommunityApplication] -> [Help 1] [ERROR] [ERROR] To see the full stack tr

2023年2月26日 00:30
488
0
fixedRate配置文件,fixedRate动态配置,fixedRateString配置

@Scheduled定时任务有多种配置 其中最常用的应该是 cron spring boot 这样写:@Scheduled(cron = "*/5 * * * * *") # corn表达式 从左到右(用空格隔开):秒 分 小时 月份中的日期 月份 星期中的日期 年份 用cron 表达式 一大优点就是直观,通用性也强 一、fixed 表达式的介绍 cron 表达式 虽然优点多多,但是在某些时候 cron表达式就没有 fixed 的方式方便 , fixed共有四个方法可选: fixedDelay、fixedDelayString、fixedRate、fixedRateString 其中搭配fixed使用的,还有两个方法: initialDelay和initialDelayString |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

2022年1月3日 17:20
1307
0
学如逆水行舟

学如逆水行舟,不进则退

2021年11月28日 16:08
1056
0
spring cloud在国内中小型公司能用起来吗?

今天吃完饭休息的时候瞎逛知乎,突然看到这个一个问题《Spring Cloud在国内中小型公司能用起来吗?》,吸引了我的注意。仔细的看了题主的问题,发现这是一个好问题,题主经过了一番思考,并且用图形全面的将自己的疑问表达了出来,作为一个研究并使用Spring Boot和Spring Cloud近两年的

2021年10月20日 23:15
1044
0
正确使用高版本mysql数据库Java驱动问题

mysql数据库驱动升级到8.x以后应用将会出现如下两个问题以及警告

2021年10月15日 22:46
1098
0
Spring中bean生命周期详细归纳

关于Spring的IOC容器中Bean的生命周期问题在各种面试或者实际开发中经常会遇到,能准确无误简述出来的人比较少,在实际开发中我们会根据Spring 托管Bean的在不同时间段做些高级拓展操作达到使用目的,本文阐述下Spring的Bean全生命周期,供在面试者或者在实际开发中需要的人进行认识与理

2021年10月15日 22:38
1089
0
深入剖析 Spring WebFlux

WebFlux 是 Spring Framework5.0 中引入的一种新的反应式Web框架。通过Reactor项目实现Reactive Streams规范,完全异步和非阻塞框架。本身不会加快程序执行速度,但在高并发情况下借助异步IO能够以少量而稳定的线程处理更高的吞吐,规避文件IO/网络IO阻塞带

2021年10月12日 23:31
1102
0