- 博客(20)
- 收藏
- 关注
原创 jenkins的基本使用---全局配置
1、全局配置Jenkins2、配置git,找到git在Linux中的安装目录(需首先下载安装git)3、配置JDK的路径(需首先下载安装JDK)4、配置maven的路径(需首先下载安装maven)并将maven的setting.xml文件路径换成所安装的maven中的setting.xml文件的路径...
2020-12-14 16:01:30
461
原创 使用jquery获取表格当前行的内容
$("button[name='btn-dg']").each(function() { var currentEle = $(this); currentEle.click(function() { var id = $(this).attr("id");//获取订单id alert(id); // $.ajax({ // ...
2020-05-26 11:08:15
476
转载 物理分页和逻辑分页的区别
一 概述1.物理分页物理分页依赖的是某一物理实体,这个物理实体就是数据库,比如MySQL数据库提供了limit关键字,程序员只需要编写带有limit关键字的SQL语句,数据库返回的就是分页结果。2.逻辑分页逻辑分页依赖的是程序员编写的代码。数据库返回的不是分页结果,而是全部数据,然后再由程序员通过代码获取分页数据,常用的操作是一次性从数据库中查询出全部数据并存储到List集合中,因...
2019-09-06 14:50:59
880
原创 使用mybatis时进行批量插入
在mapper中代码如下:<insert id="insertPersonBatch" parameterType="cn.bgi.pojo.R"> insert into t_test(name,price) values <foreach collection="list" item="person" separator="...
2019-08-23 15:06:13
135
原创 在spring boot中使用druid数据库连接池
1、首先在pom.xml导入依赖:<dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.0.18</version>&l...
2019-08-12 19:00:37
189
原创 使用springboot做单元测试遇到的一些问题
需要在测试类上写如下注解:@RunWith(SpringRunner.class)@SpringBootTest(classes={RedisDemoApplication.class})如果是maven项目需在pom.xml中写如下依赖:<dependency> <groupId>org.springframework.boot<...
2019-08-12 18:52:36
229
原创 Resdis入门(结合Java)
1、如果是maven项目的话,先在pom.xml文件中导入相关依赖包<dependencies> <dependency> <groupId>redis.clients</groupId> <artifactId>jedis</artifactId> ...
2019-08-12 15:22:00
487
原创 springboot中图片上传和显示
url映射:代码如下:"/upload/**"为映射路径,"file:D://upload/"为文件实际保存的本地路径package cn.bgi.config;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.anno...
2019-08-08 17:36:24
274
原创 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���ʱ��' is unrecognized...解决方法
需在配置文件中的url后面追加(characterEncoding=UTF-8&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC)
2019-08-07 14:12:04
286
原创 mybatis中的级联删除,通过外键同时删除两个表里面的内容
代码如下:<!-- 删除用户 --> <delete id="deleteUser" parameterType="cn.bgi.pojo.UserInfo"> delete t_userinfo,t_user from t_user left join t_userinfo on t_user.u_id = t_userinfo.u_id...
2019-08-06 14:13:37
4249
原创 iframe链接跳转问题
top.location="login.html";top.location可以使跳转页面不在iframe中显示,而跳转到另一个页面
2019-08-06 11:59:43
329
原创 ssm+easyui上传图片,并在前端显示
1、导入文件上传所必需的jar包2、配置springmvc.xml文件<!-- 控制文件上传 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <pr...
2019-08-06 10:04:42
1028
原创 后端返回json格式数据时所使用的封装类
代码如下:其中total为总记录数,rows则是返回的json数组对象public class DataResult<T> { private int total; private List<T> rows; public DataResult(int total, List<T> rows) { this.to...
2019-08-01 18:53:49
253
原创 ssm+easyui结合ajax进行登录验证
1、创建一个实体类UserCheck代码如下:public class UserCheck { private boolean result; private int aut; public boolean isResult() { return result; } public void setResult(boolean re...
2019-08-01 18:51:42
344
原创 出现There is no getter for property named 'name' in 'class java.lang.String'问题的解决方法
正确写法:<select id="findUserInfo" resultMap="userInfoResultMap"> select id,name,sex,e_mail,photo,username,password from t_user,t_userinfo where t_user.u_id = t_userinfo.u_id ...
2019-08-01 18:29:09
1535
原创 解决html中页面背景图拉伸问题
代码如下:body { background: url("img/bg.jpg") no-repeat; height: 100%; width: 100%; overflow: hidden; background-size: cov...
2019-07-31 08:55:24
2647
原创 easyui+ssm实现分页
后台代码实现:1、创建分页相关的实体类public class Pagination { private Integer page; private Integer rows; private Integer start; public Pagination() {} public Pagination(Integer page,Integ...
2019-07-30 18:26:42
218
原创 mybatis中模糊查询解决方法
使用concat()拼接函数进行拼接,代码如下:<select id="findEmployee" resultType="cn.bgi.pojo.Employee"> select * from t_employee <where> <if test="_parameter!= null"> ...
2019-07-30 09:48:03
169
原创 解决Java中IO流的中文乱码问题
编码:由字符到字节 解码:由字节到字符编码:getBytes("utf-8")解码:byte[] datas = msg.getBytes();new String(datas,0,datas.length,"utf-8");
2019-04-23 09:26:21
1204
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人