请教一个springboot的问题
java吧
全部回复
仅看楼主
level 9
问题如图所示。为什么会找不到这个方法呢?
2019年05月15日 08点05分 1
level 9
为啥呢[泪]
2019年05月15日 08点05分 2
level 1
你这个是写在映射进来的Mapper里面了是吧 , 你可以试一下新建mapper
2019年05月15日 08点05分 3
不行[委屈]
2019年05月15日 09点05分
level 1
2019年05月15日 08点05分 4
level 1
sql语句
2019年05月15日 09点05分 6
我觉得我没写错 select * from article where id = #{id}
2019年05月15日 09点05分
@我是洛秋啊🍒 *后面还有个article
2019年05月15日 09点05分
没得吧。。。我在mysql里面都能查出来的[小乖]
2019年05月15日 10点05分
@我是洛秋啊🍒 贴的图里反正有两个article
2019年05月15日 10点05分
level 9
2019年05月15日 09点05分 7
resources下面的mapper包的路径要和java下面的mapper包路径一样
2019年05月15日 13点05分
在resources再建立com.cici.bolog包,再吧mapper包丢进去
2019年05月15日 13点05分
@123456lssggh 我试试
2019年05月15日 15点05分
level 7
好像遇到过,试试在application入口加个mapperScan(“com.....mapper”),而且你后面的截图里面articleMapper没了
2019年05月15日 09点05分 8
我加过,但是没用
2019年05月15日 10点05分
我改了一下名字让他重新编译一下,下面xml有两个到嘛
2019年05月15日 10点05分
level 9
2019年05月15日 11点05分 13
mapper.xml中的namespace和ArtMapper是不是没对应上
2019年05月15日 11点05分
@drips122 对上了的 ctrl ➕单击还能跳转过去
2019年05月15日 11点05分
level 12
没有扫描到mapper.java或者mapper.xml,配置扫描路径没有噢
2019年05月15日 11点05分 14
大佬,看七楼,配置了的[委屈]
2019年05月15日 11点05分
level 7
加上@param
2019年05月15日 15点05分 17
level 3
你的classpath下的*是不是放错位置了 应该是classpath:*mapper
2019年05月17日 17点05分 18
level 13
启动类没加注解
2019年05月17日 17点05分 19
level 8
看你,application contens .xml配置
2019年05月18日 11点05分 20
level 8
把主函数贴图上来。查你注解
2019年05月20日 06点05分 21
1