- 博客(9)
- 收藏
- 关注
原创 无法创建PoolableConnectionFactory, 原因是没有jdbc数据库
做动力节点的个人博客项目因为和模板的数据库不同。所以在调整为自己的数据库于是出现了这个问题Cannot create PoolableConnectionFactory (Unknown database 'bjpowernode')其实是个小问题然后查看其他大佬的解决方案jdbc.username = rootjdbc.password = 123456jdbc.jdbcUrl = jdbc:mysql://localhost:3306/blog?useUnicode=tru
2021-11-10 15:56:09 807
转载 junit中java.lang.NullPointerException异常
用junit测试,如果是springboot项目要加@RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes=Application.class)如果是springmvc项目要加@RunWith(SpringJUnit4ClassRunner.class) 否则会抛以下错误:空指针异常原文链接:https://blog.csdn.net/haleyliu123/article/details/77977411..
2021-10-26 09:02:08 395
原创 测试控制器出现的错误
访问网页一直404.明明和老师的一样http://localhost:8080/users/reg?username=user0093&password=123456然后百度搜解决方案都说是;下面的问题。可我不是啊SpringBoot成功启动,接口无法访问,查看接口是否能被扫描到;如果接口名不能被扫描,查看启动类与接口是否保持在同级目录或子目录(@SpringBootApplication默认的扫描位置就是Application所在的同级目录和子目录),按照规则修改即可成功访问。然..
2021-10-24 21:43:58 1755
原创 测试类遇到的问题
1.org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.example.storeyz.mapper.UserMapperTests':忘记在方法上加@Test了。新手菜鸟而且注意@Test注解导入包时 不要误导入import org.junit.jupiter.api.Test正确 import org.junit.Test;2....
2021-10-24 11:32:25 129
原创 2021-10-24
java.lang.IllegalStateException: Failed to load ApplicationContextCaused by:Cause: java.lang.ClassNotFoundException: Cannot find class: com/example.oayz.entity.Employee很多大佬说是报错原因是这个 resultType=“UserEntity”找不到,或者resultMap的问题我的不是原因在这里<r..
2021-10-24 09:55:39 31
原创 2021-10-21由空格引发的血案
一个让人无语的小错误做练手springboot项目。把人家的资源文件复制过来结果spring.datasource.password=123456 密码后面多一个空格然后报错java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)老师用的MariaDB的数据库。我还以为是这个原因还去下载一些软件幸好半小时就找到原因了。笨死了希望大家引以为戒。空格的问题太难
2021-10-21 09:53:27 68
原创 Error creating bean with name ‘studentMapper‘ defined in file
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studentServiceImpl': Unsatisfied dependency expressed through field 'studentMapper'; nested exception is org.springframework.beans.factory.BeanCreationExceptio
2021-10-12 16:59:59 1588
原创 2021-10-12maven工程里用clean等报错
Process terminated具体[INFO] Scanning for projects...[ERROR] [ERROR] Some problems were encountered while processing the POMs:[ERROR] 'modules.module[1]' specifies duplicate child module ../051-springboot-interface @ line 20, column 17@[ERROR] The...
2021-10-12 11:31:50 277
原创 maven里遇到的。只有lifecycle。plugins.dependecies消失
百度半天看前辈们的解答有的说是IDEA2019.2.2与maven3.6.2(已测试)及以上(未测试)不兼容有的说基本属于maven没有配置好;最后明白原因了原因是父工程的依赖管理出错。具体是 MyBatis集成Springboot框架起步依赖深层原因还不明白- - -...
2021-10-12 11:16:18 625 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人