
springboot
半岛铁子_
那就叫小胡吧
展开
-
Field xxx required a bean of type ‘xxxMapper‘ that could not be found.
文章目录问题描述原因解决方法参考资料问题描述今天将写的一个小模块集成到另一个模块上,项目启动时报下面的错误:原因初步认为是注解啥的没写对,查了一遍没有问题,又按照一些博客说的添加@MapperScan()等等都未解决,最后在一篇博客中看到pom.xml文件,突然意识到mybatis的依赖好像没加,检查过后,果然是这个问题。解决方法在 pom.xml 文件中添加 mybatis 的依赖。 <dependency> <groupId>原创 2022-05-15 21:19:17 · 893 阅读 · 0 评论 -
问题记录:Caused by: java.net.BindException: Address already in use: JVM_Bind
问题描述跑项目时,遇到 Caused by: java.net.BindException: Address already in use: JVM_Bind 的报错,如下图所示:原因分析从报错信息可以看到,JVM需要启用18082端口,但是发现其已经被占用。因此只需要将这个端口关闭掉就好了。解决方法1.查询端口被哪些进程所占用netstat -ano | findstr 端口号2.关闭进程 tasklist | findstr 进程号3.强制关闭taskkill -PID 进程原创 2022-04-21 20:15:05 · 1959 阅读 · 0 评论 -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server ve
问题描述:在用scala将kafka消费的信息写入mysql时,报 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server…的错误,意思是你的mysql语句有问题。解决思路:刚开始我觉得mysql语句没有问题,可能是mysql版本的问题,于是从mysql8.0换回了mysql5.7,但是还是未解决问题。又检查了idea的配置,还是不行。于是我开始怀疑sql语句,经过不断的结原创 2022-03-06 21:49:56 · 2507 阅读 · 0 评论 -
SpringBoot上传文件至阿里云OSS对象
一、创建阿里云账号并开通OSS对象存储服务1、阿里云官网:https://www.aliyun.com/2、创建阿里云账号,并打开控制台,搜索OSS3、点击对象存储OSS:4、点击Buckjet列表------>点击创建Bucket,填写Bucket名称,区域选择离自己最近的城市。至此已经创建好Bucket。二、SpringBoot项目中完成文件上传至OSS此处给出OSS的帮助文档:https://help.aliyun.com/product/31815.html1、新建Spr原创 2022-02-17 15:23:28 · 1062 阅读 · 0 评论 -
Initialization failed for ‘https://start.spring.io‘ Please check URL, network and proxy setting
问题描述: 新建springboot项目时,选择Spring Initializr,报出Initialization failed for 'https://start.spring.io' Please check URL, network and proxy setting的错误。如下图所示:解决方法:File---->Settings---->在搜索栏搜索HTTP Proxy---->选择Auto-detect proxy ...原创 2021-12-30 16:54:07 · 859 阅读 · 1 评论 -
IDEA导入Springboot项目,注解和pom文件不识别
问题描述: 今天利用Idea导入springboot项目,发现注解没有识别,pom文件、配置文件也都没有识别。 原因:没有将项目加载成为一个maven项目。 解决方法:在pom.xml上右击,点击 add as Maven Project,将其加载成为一个Maven项目,即可解决。...原创 2021-12-28 10:43:30 · 2402 阅读 · 0 评论 -
springboot中上传的图片,复制url到浏览器中无法正常回显
1.问题描述: 在springboot中编写了上传文件的接口:@PostMapping("/admin/upload/file") public ApiRestResponse upload(HttpServletRequest httpServletRequest, @RequestParam("file") MultipartFile file){ String fileName = fi...原创 2021-11-28 20:45:35 · 554 阅读 · 0 评论 -
The server time zone value ‘�й���ʱ��‘ is unrecognized or represents more than one time zone.
1. 问题描述:启动java项目时,报The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if原创 2021-11-21 15:06:53 · 443 阅读 · 0 评论 -
关于spring-boot-maven-plugin报红的问题
问题描述:创建springboot项目时,在pom.xml文件中引入 spring-boot-maven-plugin 插件,一直报红。 在maven安装目录下的conf/settings.xml文件中已经配置过阿里云的镜像,reload maven还是不了解决。在网上看了些解决方法,最后加上版本号得以解决。*********注意:版本号一定要和springboot的版本一致,不然还是报红。springboot的版本号:在pom.xml文件中引入父依赖时的版本号...原创 2021-10-18 16:16:56 · 512 阅读 · 0 评论