随笔分类 - SpringBoot2.x
摘要:1.问题描述: 之前用spring MVC,转成spring boot之后发现上传不能用。网上参考说是spring boot已经有CommonsMultipartResolver了,但是我的上传后台接收的还是null。 2.解决方法 加入配置类 import org.springframework.
阅读全文
摘要:在使用Swagger的时候访问地址后出现了错误,`http://localhost:8001/swagger-ui.html` 一直在弹窗提示,还取消不了 :** 热部署针对的是容器或者是整个应用,部署了新的资源或者修改了一些代码,需要在不停机的情况下的重新加载整个应用。 **热加载(Hot Swap):** 热加载针对的是单个[字节码](https://so.csdn.net/so/sea
阅读全文
摘要:生产环境用户的隐私数据,比如手机号、身份证或者一些账号配置等信息,入库时都要进行不落地脱敏,也就是在进入我们系统时就要实时的脱敏处理。 用户数据进入系统,脱敏处理后持久化到数据库,用户查询数据时还要进行反向解密。这种场景一般需要全局处理,那么用`AOP`切面来实现在适合不过了。首先自定义两个注解`@
阅读全文
摘要:**一SpringBoot2.0.4集成SpringCloud异常:** `org.springframework.boot.builder.SpringApplicationBuilder.([Ljava/lang/Object;)V` **二、异常处理参考:** **缘起** 初学spring
阅读全文
摘要:# 直接上代码 ```java @Service public class XXXService { // 这两个必须要注入 @Resource DataSourceTransactionManager dataSourceTransactionManager; @Resource Transact
阅读全文
摘要:原因是导入了jdbc的依赖,使用@Configuration注解向spring注入了dataSource bean。 但是因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错。 有两个办法: 办法1: 去除spring-boo
阅读全文
摘要:1、问题 运行Spring Boot项目,发生java.lang.IllegalArgumentException异常,原因如下: ContextPath must start with '/' and not end with '/' 完整的Run输出如下: . ____ _ __ _ _ /\\
阅读全文
摘要:错误信息: com.xubo.rabbitmq.springbootrabbitmq.SpringbootRabbitmqApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| |
阅读全文
摘要:报错: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.NullPointerException错误 项目版本: springboot最新版本 <parent> <group
阅读全文
摘要:##报错信息: `APPLICATION FAILED TO START Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could
阅读全文
摘要:报错完整信息:This application has no explicit mapping for /error, so you are seeing this as a fallback 翻阅了网上众多资料,主要有三种解决的方向: 方向1: Application启动类的位置不对.要将Appl
阅读全文
摘要:报错信息: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.xubo.mybatisplus.MyBatisPlusTest': Unsatisf
阅读全文
摘要:参考声明:https://blog.csdn.net/zzhongcy/article/details/124488799 1.错误现象 最近升级Springboot 2.6.2到Springboot 2.6.7, mysql版本: mysql-5.7.27 DB配置: spring.datasou
阅读全文
摘要:参考声明:https://www.cnblogs.com/melodyjerry/p/14357630.html 参考声明:https://www.cnblogs.com/flower-dance/p/14267042.html @RestController @RestController注解,相
阅读全文
摘要:声明:参考自https://www.cnblogs.com/kendoziyu/p/16085393.html 一、修改打包形式 在 pom.xml 里设置 <packaging>war</packaging> 二、移除嵌入式tomcat插件 在 pom.xml 里找到spring-boot-sta
阅读全文
摘要:参考声明:https://www.cnblogs.com/thesheepn/p/16136425.html,感谢博主。 1.安装JDK 官网下载JDKhttps://www.oracle.com/java/technologies/downloads/#java8 查看/usr/下是否有java文
阅读全文