首页 > 其他分享 >关于初次new springboot项目

关于初次new springboot项目

时间:2023-09-23 16:48:34浏览次数:27  
标签:springboot maven bean 初次 new com class

如果是新手初学,然后做springboot项目报各种错,改来改去最终都无法出现successful字样。

请先检查,maven环境是否配好。

maven环境决定你下载依赖的速度,以及能否下载成功。

 

maven管理你的springboot项目,所以配置它的环境是必不可少的。

 

比如未配置maven环境直接运行项目可能会报以下错误。

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.

 

java: 无法访问jakarta.persistence.Column 错误的类文件: balabala...

 

警告: Runner org.junit.internal.runners.ErrorReportingRunner (used on com.itheima.BookJpaTests) does not support filtering and will therefore be run completely. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.itheima.BookJpaTests': Unsatisfied dependency expressed through field 'repository'; nested exception is org.springframework.beans.factory.

 

NoSuchBeanDefinitionException: No qualifying bean of type 'com.itheima.stutest01.repository.BookRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:balabala

 

 

可能有些帖子写,无启动类路径。如果maven环境一开始有配好,new出来的项目,自带balalbatest.java的文件,中是自带启动注解的 

@RunWith(SpringRunner.class)

      ------->         

 

 

 

 

标签:springboot,maven,bean,初次,new,com,class
From: https://www.cnblogs.com/meizai/p/17724439.html

相关文章

  • Springboot+Vue(二)
    上传的静态资源文件放到static文件夹下即可表单的enctype属性规定再发送到服务器之前该如何对表单数据进行编码默认情况下数据格式为key=value&key=value需要改成enctype="multipart/form-data"默认情况下限制了单次请求文件的大小单个文件不能超过1Mb所有文件不能超过......
  • springboot 接收前端数组
    前端:(黄色内容为必选项!!!)axios({url:"/access/getArr",method:"post",data:JSON.stringify([1,2,3,4]),headers:{"Content-Type":"application/json",},});后端:@RequestMapping(value=......
  • springboot项目可以是那些缓存技术
    SpringBoot项目可以使用多种缓存技术,下面列举了一些常见的缓存技术以及它们的优缺点:Redis:优点:Redis是一个开源的内存数据结构存储,用作数据库、缓存和消息代理。其读写速度非常快,因为数据存储在内存中。Redis支持丰富的数据类型,如字符串、列表、集合、哈希、有序集合等,可以满足不同......
  • 记一次操蛋的springboot整合mybatis的配置
    这是我的xml映射器配置:点击查看代码<mappernamespace="com.yige.askroadserver.dao.AdminMapper"><insertid="insertAdmin"parameterType="com/yige/askroadmodel/entity/user/Admin">--INSERTINTOadmin_info(na......
  • springboot数据传到前端在echarts中显示
    后端正常返回查询所有的信息前端使用echarts.min.js和jquery.min.js进行使用ajax使用:$(document).ready(function(){$.ajax({url:'http://localhost:7070/selectHang',//你的urlmethod:'GET',//方法名......
  • 8-SpringBoot工程搭建
    创建Maven工程参考:https://www.cnblogs.com/TangXiaoHuiHui/articles/12264019.html进行创建添加相关依赖<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.6.......
  • Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connect
    报错 Maxretriesexceededwithurl:/(CausedbyNewConnectionError('<urllib3.connection.HTTPSConnectionobjectat0x000001A73833FD00>:Failedtoestablishanewconnection:[WinError10060]  pipuninstallrequestsurllib3  #先卸载pipinstallre......
  • 干货,某大厂小姐姐深夜让我说出了秘密-springboot发邮件
    后端依赖<!--引入mail依赖--><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-mail</artifactId></dependency><!--使用thymeleaf构建邮件模板--><depen......
  • SpringBoot中内置Servlet容器原理
    本篇博客会梳理一下SpringBoot内置Servlet容器的原理:原理其实跟SpringBoot中的内置Tomcat的启动原理差不多,我们从整个源码进行梳理一下。我们会发现当我们从Spring,SpringMVC演化到SpringBoot后发现采用SpringBoot后不需要配置Tomcat服务器了,这是什么原因呐,我们启动整个SpringBo......
  • SpringBoot疫苗在线预约接种系统
    SpringBoot疫苗在线预约接种系统系统功能首页:图片轮播宣传疫苗列表在线预约疫苗新闻资讯新闻详情登录注册留言板个人中心我的预约后台管理:登录新闻管理留言板管理回复管理预约管理用户管理疫苗库管理系统管理用户管理角色管理日志管理操作日志登录日志......