自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 SpringBoot如何在新建Bean的时候给其属性赋值

第三种方法:使用Spring Boot的CommandLineRunner或ApplicationRunner。第二种方法:实现InitializingBean接口的afterPropertiesSet方法。第一种方法:使用@PostConstruct注解。

2024-12-10 21:26:42 314

原创 使用Spring Security实现权限控制

【代码】使用Spring Security实现权限控制。

2024-08-23 21:07:02 995

原创 spring boot+spring security认证authorities反序列化失败的错误,SimpleGrantedAuthority`cannot deserialize Object

在实体类user中只有userid,Uusername, Ppassword,role这四个属性都有get,set方法,但是其他方法有返回值,所以在序列化时,其他方法返回的值也会被序列化存在缓存中,此时不会出错,但是从缓存中反序列化时就因为有些值没有set方法,所以会出错。但有时会碰到必须要有有返回值的其他方法,例如在整合security时自定义登录认证和权限认证时需要继承UserDetail,就必须有其他方法,这时候可以RedisTemplate的设置里加。

2024-08-19 00:59:06 710

原创 maven配置报错:The JAVA_HOME environment variable is not defined correctly

解决jdk17中的maven3.8.8配置报错:The JAVA_HOME environment variable is not defined correctly

2024-08-17 12:03:18 473

原创 【报错】Error creating bean with name ‘persistenceExceptionTranslationPostProcessor‘ defined,Invalidname

解决办法将spring-boot-starter-parent这里我的版本是3.3.2版本降低成如下版本。

2024-08-16 12:48:20 470

原创 【报错】Unsatisfied dependency expressed through field ‘driverInfoService‘,Property ‘sqlSessionFactory‘

小结:我这里用到的 spring-boot-starter-parent和mybatis-plus-boot-starter的相关版本如下。先检查在Mapper接口上加。再添加pom.xml依赖。

2024-08-16 12:36:22 558

原创 【java腾讯防水墙】

腾讯防水墙(这里用到的kong网关)

2023-07-04 16:14:19 314

原创 【java字节数组转换MultipartFile】

字节数组转换MultipartFile对象

2023-07-04 15:15:54 3589 1

原创 java项目打包jar包,zip包

将Java项目打包,打成lib和zip包,zip包解压直接可以部署构建

2022-11-18 15:16:28 330

原创 MySQL 查询语句

MySQL 条件查询,分组查询,子查询,连接查询,分页查询

2022-05-15 22:18:53 237

原创 MybatisPlus代码生成工具

用户生成entity,service,mapper等

2022-05-04 23:12:35 280

原创 【Spring Boot】 注解

SpringBoot注解

2022-04-26 23:30:49 352

原创 关于logback的配置和介绍,logback-spring.xml配置文件

logback-spring.xml配置文件

2022-04-25 23:51:55 101

原创 Spring整合mybatis的applicationContext.xml配置文件

spring整合mybatis中resource下面的配置文件

2022-02-26 22:38:44 480

原创 generatorConfiguration.xml

代码自动生成的xml配置

2022-02-16 17:08:55 129

原创 Rbac-manager权限管理项目

一、RBAC-MANAGER(用户权限管理)1.pom.xml<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http...

2021-10-14 22:28:14 243

原创 springmvc.xml常用配置

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc=".

2021-09-15 19:43:29 108

原创 Spring.xml常用配置

<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc=".

2021-09-15 19:32:15 92

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除