Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.9k views
in Technique[技术] by (71.8m points)

使用maven创建mybatis项目时 报找不到mybatis-config.xml

楼主是PHP刚刚转过来的java 然后 刚刚看了maven的教程,写好的代码后准备测试时确保错
Could not find resource mybatis-config.xml
image.png
下面是代码:
MybatisUtil.java
image.png
Mybatis-config.xml
image.png
测试类
image.png

maven中 资源路径这么写可以不?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

同PHP转java几年,建议使用mybatis-plus吧,更方便点,不用写xml,可以参考下我的这篇文章:
PHP转JAVA开发30分钟实战攻略


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...