springboot
文章平均质量分 68
Halo丶3
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Junit测试运行出现No tests were found
Junit单元测试运行出现No tests were found问题解决原创 2022-07-13 09:55:29 · 9645 阅读 · 3 评论 -
java.sql.SQLException: Access denied for user ‘‘@‘localhost‘ (using password: YES)
今天使用springboot整合mybatis,运行测试查询的时候出现这个错误:org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user ‘’@‘localhost’ (using password: YES)出现原因:应该是配置连接类型的时候选择原创 2020-12-14 20:39:27 · 319 阅读 · 1 评论 -
Failed to convert from type [java.lang.String] to type [java.util.Date]
nested exception is org.springframework.core.convert.ConversionFailedException: Failed to convert from type [java.lang.String] to type [java.util.Date] for value ‘2019-05-30 14:47:24’; nested exceptio...原创 2019-06-17 00:10:48 · 31656 阅读 · 6 评论 -
springboot+使用ajax上传文件并返回路径存入数据库
//上传图片function uploadImage(formData) {$.ajax({type:“POST”,url:"/product/upload",contentType:false,data:formData,processData:false,success:function (result) {alert(result.msg);window.location...原创 2019-06-20 19:51:15 · 1129 阅读 · 0 评论 -
springboot2.0+shiro整合使用redis缓存
最近自己搭建了个springboot2.x整合shiro框架使用Redis缓存的环境,以后可能会用得上,特意保存记录下来。首先是必要的一些依赖代码<?xml version="1.0" encoding="UTF-8"?>4.0.0org.springframework.bootspring-boot-starter-parent2.1.3.RELEASE co...原创 2019-05-05 14:23:43 · 2474 阅读 · 3 评论 -
springboot全局异常
springboot使用全局异常,其实重点在于 @ControllerAdvice这个注解上,这个注解代表的是捕获控制器层的异常@ControllerAdvicepublic class UnauthorizedException{ @ExceptionHandler(value = org.apache.shiro.authz.UnauthorizedException.class...原创 2019-07-15 22:51:01 · 269 阅读 · 0 评论 -
springboot通过拦截器解决响应跨域问题
package com.qyq.springbootapi.util;import org.springframework.stereotype.Component;import javax.servlet.*;import javax.servlet.http.HttpServletResponse;import java.io.IOException;/** * 解决返回信息...原创 2019-07-16 18:30:14 · 792 阅读 · 0 评论 -
restTemplate.getForObject方法第三方接口请求URL转义异常java.lang.IllegalArgumentException:Invalid character
ResponseResult object = restTemplate.getForObject("http://localhost:8080/test?result={1}", ResponseResult.class,encrypt);UriComponentsBuilderURI uri = UriComponentsBuilder.fromHttpUrl("http://loc...原创 2019-07-16 18:51:46 · 8995 阅读 · 4 评论
分享