自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 获取项目中文件的绝对路径的问题

获取文件路径可以使用String path=this.getClass().getClassLoader().getResource("").getPath();来获取;其中getResource参数是你所需要获得的文件的类路径首先我们测试什么也不填会得到什么路径public void myBatis(){String path = this.getClass().getClassLoa...

2019-01-23 11:26:24 2707

转载 Spring boot中打印myBatis的sql语句

如果使用的是application.properties文件,加入如下配置logging.level.com.example.demo.dao=debuglogging.level.com,后面的路径指的是mybatis对应的方法接口所在的包。并不是mapper.xml所在的包。如果使用的是application.yml文件,加入如下配置:logging:level:com.examp...

2019-01-23 11:17:17 1403 1

原创 Mybatis 传入参数为数组或者是集合

代码如下int[] a = {1,2};List list=userDao.findStudent(a);Mapper文件如下,其中parameterType可以不写,但是foreach标签中的 collection属性必须为array,如果是集合的话则必须为list, <select id="findStudent" resultType="Student" > sele...

2019-01-23 11:13:45 1560

原创 Spring boot的文件上传(多文件)

多文件上传的form表单如下<form action="/fileUpload" enctype="multipart/form-data" method="post"> <input type="file" name="file" multiple="multiple"> <input

2019-01-16 14:31:15 93

原创 Mybatis之查询传入多参数问题(自用)

我认为最方便的办法就是使用@Param注解用法如下`Dao层代码@Mapperpublic interface FnedouDao {Student findStudent(@Param(“age”)int age, @Param(“nianji”)int nianji);}Mapper文件<?xml version="1.0" encoding="UTF-8" ?>...

2019-01-16 14:23:58 107

原创 Spring boot的搭建以及整合Mybatis 自用

1.首先要在maven的pom文件中引入这两个依赖2. 编写启动类注意启动类的位置必须在业务代码的外层,如图所示3. 继承 SpringBootServletInitializer@SpringBootApplicationpublic class SptestApplication extends SpringBootServletInitializer {public s...

2019-01-14 16:29:44 701

原创 关于前端使用easyUI框架的问题总结

1.如果使用datagrid数据表作为展示数据的方法,则对应的查询Action中的result注解中不可以返回页面(location=……),需要写成如下格式 results={@Result(name=”success”,type=”json”)}),type=json此时datagrid数据表会直接显示json中的数据。...

2018-08-31 08:55:05 750

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除