SpringBoot
文章平均质量分 55
君去何方
主要从事基于 B/S 架构的 Web 应用开发,擅长Java后端开发并且也有一些小程序方面的经验;这里是我的博客,用于记录知识、分享经验和合作探讨的地方,如果您有任何问题或想法,欢迎随时提出。
展开
-
通过HandlerMethodArgumentResolver自定义参数解析器
SpringBoot 自定义参数解析器 业务场景原创 2021-11-10 14:51:32 · 1591 阅读 · 0 评论 -
SpringBoot中的全局异常处理
当我们进行项目搭建的时候,对异常处理使用全局异常处理。原创 2021-04-23 17:27:31 · 317 阅读 · 1 评论 -
Spring-Cloud-Config微服务启动报错Failed to configure a DataSource: ‘url‘ attribute is not specified and no
小问题原创 2021-04-08 13:10:07 · 1083 阅读 · 0 评论 -
SpringBoot项目接口测试报错 Invalid bound statement (not found): com.wz.springcloud.dao.DeptDao.queryAll
小错误记录原创 2021-03-20 19:01:55 · 1420 阅读 · 1 评论 -
SpringBoot项目如何打成jar包
原创 2021-03-11 10:02:07 · 79 阅读 · 0 评论 -
关于SpringBoot远程连接Linux上Redis出现RedisConnectionException: Unable to connect to xxx.xxx.xxx.xxx:6379的问题
org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException: Unable to connect to xxxxxxxx:6379原创 2021-03-10 18:49:12 · 5179 阅读 · 4 评论 -
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘dep
1、这个情况可能是使用了MyBtis但是没有在dao层写@Mapper注解2、继续浏览最底层的报错信息,你会发现也有可能是在mapper.xml中的全限定类名写错原创 2021-02-14 14:33:43 · 2395 阅读 · 0 评论 -
SpringBoot + Redis + Shiro + JWT单点登录主流安全框架
SpringBoot集成Redis、Shiro、JWT原创 2021-01-29 16:35:54 · 2112 阅读 · 1 评论 -
proxy-target-class使用Cglib基于子类创建代理对象
proxy-target-class属性值决定是基于接口的还是基于类的代理被创建。如果proxy-target-class 属性值被设置为true,那么基于类的代理将起作用(这时需要cglib库)。如果proxy-target-class属值被设置为false或者这个属性被省略,那么标准的JDK 基于接口的代理。如果报错:java.lang.ClassCastException: com.sun.proxy.$Proxy12 cannot be cast to cn.edu.nuc.SpringTest原创 2020-12-10 08:47:06 · 257 阅读 · 0 评论 -
创建SpringBoot项目全部流程
第一部分:新建工程和基础配置1、 首先创建项目,IDEA中选择File→Project→Spring Initializr→命名包名和项目名称(此处不能有大写字母)→选择Web、Mybatis、JDBC、MySQL自动导入pom,xml依赖。(建议先右键pom.xml——>maven——open settings.xml——>标签中是否配置了阿里云maven仓库,如果没有,在下面粘贴如下代码 <!-- 阿里云仓库 --> <mirror>原创 2020-11-12 22:39:26 · 3623 阅读 · 0 评论 -
Spring和SpringBoot中的依赖注入的实现比较
IOC的作用:降低程序间的耦合(依赖关系)并不能完全消除依赖关系(耦合),将依赖关系的管理交给Spring维护.当前类需要用到其他类的对象,由Spring为我们提供,我们只需要在配置文件中说明。Spring中的依赖注入:在Spring中使用配置文件对需要注入的其他类对象进行注入。能注入的数据有三类:基本类型和String其他的Bean类型(在配置文件中或者注解配置过的bean)复杂类型/集合类型注入方式:构造函数提供使用Set方法提供使用注解提供SpringBoot中的依原创 2020-09-15 18:32:36 · 390 阅读 · 0 评论 -
Field topicOptionDao in XXX required a bean of type ‘XXX‘ that could not be found.
启动springboot报错如下:Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2020-09-05 08:59:09.757 ERROR 4276 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : **********************原创 2020-09-05 09:04:20 · 108 阅读 · 0 评论 -
SpringBoot整合MyBatis(配置文件版)
第一部分:新建工程和基础配置1、 首先创建项目,IDEA中选择File→Project→Spring Initializr→命名包名和项目名称(此处不能有大写字母)→选择Web、Mybatis、JDBC、MySQL自动导入pom,xml依赖。2、 在src-main-java-resources下创建application.yml 不能修改文件名 (SpringBoot推荐配置)。3、 在配置文件application.yml写入MySQL相关的配置信息spring: datasource:原创 2020-08-29 16:33:55 · 4490 阅读 · 0 评论 -
关于在服务器(Windwos)上部署SpringBoot写的博客系统
耗时20天终于完成了整个博客。泪目原创 2020-08-20 22:51:07 · 160 阅读 · 0 评论 -
解决问题Request method ‘GET‘ not supported
1、Controller层@PostMapping没写路径2、前端表单未指定POST传参方式3、前端参数数据类型与数据库中对应参数数据类型不一致。原创 2020-08-15 19:28:12 · 1518 阅读 · 0 评论 -
SpringBoot + thymeleaf 新增数据成功数据显示成功,但页面刷新后网页数据不显示
异步开发坑。。。原创 2020-08-15 19:06:37 · 1662 阅读 · 0 评论 -
SpringBoot + Thymeleaf调用接口报错EL1007E: Property or field ‘xxx‘ canno be found on null
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'totalPages' cannot be found on null原创 2020-08-09 18:53:31 · 1524 阅读 · 0 评论 -
【妥协!】SpringBoot2.X版本坑导致拦截器报错问题解决
记一次版本坑。原创 2020-08-06 17:55:49 · 992 阅读 · 0 评论 -
解决在IDEA环境下SpringBoot+JPA启动不报错但无法根据实体类自动生成数据表的问题
各种原因。原创 2020-08-03 18:39:00 · 1671 阅读 · 0 评论 -
Springboot日志logging下的file属性配置日志文件保存位置。
loggin: file: path: Q:/A/B/C name: SPRING_LOG.log原创 2020-08-01 22:43:12 · 1185 阅读 · 0 评论 -
SpringBoot使用thymeleaf模板编译器引用写好的HTML页面不显示图片与CSS无效的问题的解决
如题原创 2020-08-01 18:30:33 · 1458 阅读 · 1 评论 -
【特殊情况】SpringBoot的@Aspect注解不起作用的问题
关于SpringBoot踩的坑。原创 2020-08-01 11:15:48 · 15718 阅读 · 5 评论 -
An error happened during template parsing (template: “class path resource [templates/emp/error.html]
SpringBoot+thymeleaf报错An error happened during template parsing (template: "class path resource [templates/emp/error.html]找了许多方法,,都不是我要的结果。最终发现我的异常处理类里面的Exception的E是大写,而返回异常处理信息页面的error.html中exception.message等之类的是小写,改了之后运行成功。...原创 2020-07-31 15:19:47 · 240 阅读 · 0 评论 -
[IDEA]关于SpringBoot项目启动类中@SpringBootApplication注解无法导入问题
几经波折的一些问题原创 2020-07-29 17:10:11 · 6481 阅读 · 1 评论 -
SpringBoot导入Druid接口监控的方法步骤
SpringBoot调用阿里可视化接口监控Druid的操作原创 2020-07-19 11:30:45 · 379 阅读 · 1 评论 -
【超简单】SpringBoot整合注解MyBatis
搭建简单的SpringBoot项目。需要MyBtais、SQL、SpringBoot相关知识。原创 2020-07-12 18:45:53 · 702 阅读 · 0 评论 -
springboot使用JDBC报错Access denied for user ‘‘@‘localhost‘ (using password: NO)
原配置文件(yml)spring: datasource: data-username: root data-password: root123 url: jdbc:mysql://localhost:3306/wzmysql?useUnicode=true&&characterEncoding=utf8&&useSSL=false&&serverTimezone=GMT%2B8 driver-class-name: co原创 2020-07-09 16:01:00 · 413 阅读 · 0 评论 -
<解决>SpringBoot启动报错:Correct the classpath of your application so....
SpringBoot启动报错:Correct the classpath of your application so that it contains a single, compatible version of org.thymeleaf.spring5.SpringTemplateEngine经排查发现:因为thymeleaf版本为3.3.1,所以springboot应该使用1.5.10。修改后成功。...原创 2020-07-08 15:38:13 · 3913 阅读 · 4 评论 -
Springboot过程打包出错,报错测试停止运行
大部分是settings的profiles报错,将其多余的空格删除后正确运行。随后又遇见了打包时报错:There are test failures.将maven project上那个闪电符号开启(禁用测试),即可。原创 2020-06-30 16:59:15 · 629 阅读 · 0 评论