关于初次new springboot项目

如果是新手初学,然后做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)

------->

复制代码
 
相关推荐
这个昵称不容易25 分钟前
SpringBoot「衣依」服装销售平台:144个Java文件180个接口,从挑衣服到收货评价整条链路都在
java·springboot·毕设
计算机毕设定制辅导-无忧学长1 小时前
《基于微信小程序的居家医疗陪护预约系统设计与实现》
java·spring boot·微信小程序·uniapp·居家医疗陪护预约系统
文丑颜不良啊2 小时前
LeetCode2221~2240题目解析
java·leetcode
秋饼2 小时前
Computer Use Agent Java 落地实战:感知-行动循环、执行器与安全围栏生产级实现
java·ai·技术分享·后端开发
文丑颜不良啊4 小时前
LeetCode2161~2180题目解析
java·leetcode
文丑颜不良啊6 小时前
LeetCode2141~2160题目解析
java·leetcode
LabVIEW开发6 小时前
LabVIEW 连接板:28 个端子怎么排,优先级怎么定
java·算法·labview
天天被压力7 小时前
【A股分钟级高频数据完全手册 #07】北交所历史分钟K线接口:京市Pro版分时批量
java·人工智能·python
天天被压力7 小时前
【A股分钟级高频数据完全手册 #08】股票日、分时数据接口对比:普通分时与Pro版差异实测
java·人工智能·python
特立独行的猫A7 小时前
AI 时代,我为什么推荐用 cj-tauri 开发桌面应用
java·后端·python