
spring boot
fenyu8
这个作者很懒,什么都没留下…
展开
-
spring boot升级log4j2.version
因log4j2漏洞问题,需要把spring boot的log4j2版本升级到2.16.0,可以用<log4j2.version>对版本进行升级, <properties> <log4j2.version>2.16.0</log4j2.version> </properties>更新后,可以看到所引用的log4j2包已更新到指定版本为什么Spring Boot项目加上<log4j2.vers.转载 2022-04-02 17:43:52 · 1459 阅读 · 0 评论 -
FeignClient报错:quired a bean of type ‘com.csg.sdc.frontend.facade.client.VesselClient‘ that could not
spring boot写了一个FeignClient,启动项目时报错Description:Field vesselClient in com.csg.sdc.frontend.service.CustomUserFocusService required a bean of type 'com.csg.sdc.frontend.facade.client.VesselClient' that could not be found.Action:Consider defining a b原创 2022-03-30 11:03:31 · 358 阅读 · 0 评论 -
在pom.xml中使用distributionManagement将项目打包上传到nexus私服
在使用maven过程中,我们在开发阶段经常性的会有很多公共库处于不稳定状态,随时需要修改并发布,可能一天就要发布一次,遇到bug时,甚至一天要发布N次。我们知道,maven的依赖管理是基于版本管理的,对于发布状态的artifact,如果版本号相同,即使我们内部的镜像服务器上的组件比本地新,maven也不会主动下载的。如果我们在开发阶段都是基于正式发布版本来做依赖管理,那么遇到这个问题,就需要升级组件的版本号,可这样就明显不符合要求和实际情况了。但是,如果是基于快照版本,那么问题就自热而然的解决了,而mave转载 2022-03-24 16:31:56 · 889 阅读 · 0 评论 -
【无标题】
1.在项目soms-bo通过feign调用soms-auth报错:feign.codec.DecodeException: Error while extracting response for type [java.util.List<com.sz.soms.auth.api.facade.user.vo.UserInfoVO>] and content type [application/json]; nested exception is org.springframework.ht原创 2022-01-14 16:37:20 · 187 阅读 · 0 评论 -
Spring boot 集成Nacos注册中心
1.新建Springboot项目,添加Nacos依赖 <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> <version>2.2.4.RELEASE</ve.原创 2021-12-23 15:17:15 · 1025 阅读 · 1 评论 -
Docker基本操作,以及基于Docker部署SpringBoot项目
安装docker,依次执行以下命令yum updateyum install docker启动dockersystemctl start docker设置开机自启systemctl enable docker查看docker版本docker -v更换docker容器镜像服务为阿里的仓库地址mkdir -p /etc/dockertee /etc/docker/daemon.json <<-'EOF'{ "registry-mirrors": ["ht转载 2020-11-25 16:19:20 · 189 阅读 · 0 评论 -
hikari参数配置的问题
项目启动后,过段时候就挂掉,查询tomcat日志:HikariPool-1 - Failed to validate connection com.mysql.cj.jdbc.ConnectionImpl@21c326f0 (No operations allowed after connection closed.)意思就是当springboot连接数据库的时候,会建立一个和数据库的连接,这个连接保存在数据库连接池中,现在这个连接已经time out已经不能用了,但是这个连接还是保存在数据库连接转载 2020-07-24 09:47:23 · 3821 阅读 · 0 评论 -
Spring 集成flowable 踩坑
1.启动报错Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver class解决:在数据库连接url加上&nullCatalogMeansCurrent=truejdbc:mysql://11原创 2020-07-21 09:37:49 · 1425 阅读 · 0 评论 -
Spring boot + mybatis + thymeleaf 实现动态新增、删除定时任务
1.添加执行定时任务的线程池配置类package com.fy8.fund.schedule.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;@Configur原创 2020-07-19 12:53:13 · 694 阅读 · 0 评论 -
Spring Boot中配置定时任务、线程池与多线程池执行的方法
1.添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>2.启动类添加@EnableScheduling //开启任务高度package com.fy原创 2020-07-14 00:06:58 · 854 阅读 · 0 评论 -
Spring Boot整合MyBatis通用Mapper
1.pom.xml添加依赖 <!--分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.2.13</ver原创 2020-07-11 15:49:11 · 225 阅读 · 0 评论 -
Idea 项目设置Maven
1.安装Maven插件2.设置Maven的settings.xml:D:\Program Files\apache-maven-3.6.3\conf\settings.xml设置仓库路径:<localRepository>D:\Program Files\apache-maven-3.6.3\repository</localRepository>设置仓库国内镜像: <mirror> <id>nexus-aliyun...原创 2020-07-11 00:25:06 · 138 阅读 · 0 评论