关于初次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)

------->

复制代码
 
相关推荐
不爱编程的小九九3 小时前
小九源码-springboot004-springboot智能阅读推荐系统
java·spring boot·后端
SCandL1523 小时前
Docker的实战应用
java·docker·容器
AC赳赳老秦4 小时前
OpenClaw 多源采集公开行业数据:从原始信息到研究报告初稿的自动化实践
java·c语言·c++·python·php·deepseek·openclaw
典典分享指南4 小时前
用指纹算法给文章去重:mid_signature 实战
jvm·maven·intellij-idea·jetty
Java成神之路-4 小时前
深入理解三大高频队列:ArrayDeque、LinkedList、PriorityQueue 方法、特性与场景选择
java
roman_日积跬步-终至千里4 小时前
【资源控制】自助查询的智能路由
java·大数据·数据库
步行cgn5 小时前
MyBatis Error evaluating expression ‘ids‘. Return value (3) was not iterable 错误详
java·后端
lhldsg5 小时前
社区健身场地规划实战指南:从器材配置到智能化管理经验分享
java·开发语言·经验分享·小程序
LayZhangStrive5 小时前
后端通识 - 后端工程开发常用的流程图类别
java·流程图·后端开发
WIN赢5 小时前
【抽象思想-从复杂中抽离简单、收敛的口子】
java·前端·javascript