思路:查询直接在mapper.xml映射文件中写死。如:

select * from base_region where id = #{value}   改为   select * from base_region where id = 1

增删改直接在controller写死。

 

1.设置好application.yml配置文件的端口号Server:port:8765,检查数据库连接

2.启动application类的main函数

基于Springboot纯Controller层代码功能测试

 

3.成功启动springboot,打开浏览器输入:http://localhost:端口号/类名前的@RequestMapping路径/对应方法的@RequestMapping

4.成功查询则返回如下页面:

基于Springboot纯Controller层代码功能测试

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-09-24
  • 2021-12-13
  • 2021-06-16
  • 2021-09-05
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2022-01-02
  • 2021-10-26
  • 2021-07-05
  • 2022-12-23
  • 2021-08-14
相关资源
相似解决方案