- 博客(79)
- 收藏
- 关注
原创 最后一次更新
因为遇到问题时,我也是在网络上到处寻找解决办法,而找到解决方法总是那么的困难,而且有很多千篇一律的文章,所以我记录下来的都是当时能解决我问题的真实记录,不可能适合所有人,毕竟每个人的开发环境有差异。如果能够帮助到你,我很开心,如果不能,你可以继续寻找解决办法,无需评论。很早的时候看过一本书《不抱怨的世界》,如果你说不出善意的言语,you can shut up and go away!不知道优快云能够存活多久,希望可以很久很久,多年以后我还可以回来看看自己曾经的记录。
2024-05-07 19:15:40
98
原创 mybatis collection应用实例
<resultMap id="BaseResultMap" type="com.gdkj.tmu_xg.pojo.SysPurview" > <result column="ROLEID" property="rid"></result> <result column="PURVIEW" property="id"></result> <result column="NAME" property="name">.
2020-06-24 15:27:05
723
原创 《Java 8实战》摘抄
Java 81、函数式编程范式的基石:一是没有共享的可变数据,二是将方法和函数即代码传递给其他方法的能力。不能有共享的可变数据的要求意味着,一个方法是可以通过它将参数值转换为结果的方式完全描述的;换句话说,它的行为就像一个数学函数,没有可见的副作用。2、Java 8中增加的一个编程概念是通过API来传递代码的能力。Stream API就是构建在通过传递代码使操作行为实现参数化的思想上的。3、Java 8中新增的编程概念:流处理。流是一系列数据项,一次只生成一项。程序可以从输入流中一个一个读取
2020-06-19 14:45:26
224
原创 swagger-bootstrap-ui配置
1、添加依赖 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </dependency> <depende
2020-06-16 16:26:51
976
原创 Idea创建web service
1、新建Web Service项目,Version选择“Apache Axis”;2、Tools->WebServices->Generate WsdlFrom Java Code,生成wsdl文件。一开始,生成报错:java.lang.IllegalStateException: Error looking for paramter names in bytecode: unexpected bytes in file后来在Project Structure中修改jdk版本为1..
2020-06-05 11:02:28
670
原创 idea工程加入svn
将已有工程加入svn。第一步,Enable vesion control第二步,Import into Version Control,将工程上传到svn服务器第三步,check out
2020-05-18 16:02:07
340
原创 BootstrapTable服务器端分页
几个关键点:1、参数:sidePagination为server, queryParams传递参数sidePagination: 'server', pagination: true, //分页 pageSize: 10, pageNumber: 1, queryParamsType: '', contentType: "application/x-www-form-urlenc
2020-05-13 11:07:22
388
转载 最外层DIV盒子水平布局居中条件
1、不能使用float(无论 float:left 和 float:right 都不能使用)2、对body设置 text-align:center,以便兼容低版本和高版本浏览器3、对最外层DIV设置margin:0 auto,兼容各大浏览器水平居中样式原文链接:http://www.divcss5.com/jiqiao/j772.shtml...
2020-04-24 15:47:26
551
原创 360浏览器调试时切换内核
360浏览器调试时,可选择IE内核,并可以绑定域名,这样调试起来很方便。在设置->高级设置->内核切换设置里切换,直接改成IE内核,F12调试时可切换IE内核版本。360浏览器支持IE内核和WebKit内核。...
2020-04-24 14:40:59
1892
原创 IDEA Unescaped xml character报错的解决办法
File-Settings里边,选择Editor - Inspections,并在右边找到HTML下的Malformed content of <script> tag, 取消勾选,点击OK 即可
2020-04-24 10:44:11
300
转载 margin: 0 auto 在部分浏览器中失效的解决方案
在IE低版本和以IE为内核的360浏览器中,发现margin: 0 auto没起作用。解决方案如下:很多人都忽略了“文档类型”。下面就是正确设置的文档类型了。<!DOCTYPE html PUBLIC “-//W3C//DTDXHTML 1.0Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio...
2020-04-24 10:41:13
455
转载 Saying goodbye to Flash in Chrome
Today,Adobe announced its plansto stop supporting Flash at the end of 2020.For 20 years, Flash has helped shape the way that you play games, watch videos and run applications on the web. But over ...
2020-01-16 09:58:14
422
原创 内网开发,分页插件依赖
内网开发,SpringBoot用的是2.1.9版本,在pom.xml单独引入一个<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <v...
2020-01-09 15:40:57
271
原创 SpringBoot项目启动找不到main类
解决方法:1、重新建个工程,拷贝原有文件。2、删除main.iml文件。这种可以试试,主要是不知道这个问题是如何出现的。问题出现过程:第一次,不知道为什么第二次,删除idea文件夹,重新导入工程后出现。...
2020-01-09 09:40:48
4993
原创 @RequestBody和文件上传同时提交
需要将实体类前的@RequestBody去掉,另加参数接收上传文件,如第一种写法(BeanName bean, MultipartFile file)第二种写法(BeanName bean, @RequestParam(value="file", required=false)MultipartFile file)经测试,两种写法都是成功的。...
2020-01-08 09:32:24
19783
8
原创 html页面强制刷新,清缓存
在html页面头部添加<meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-Control" content="no-cache"><meta http-equiv="Expires" content="0">
2020-01-02 10:17:12
11060
1
原创 打包时不执行mybatis generator
增加 <phase>deploy</phase><executions> <execution> <id>Generate MyBatis Artifacts</id> <phase>deploy</phase> <goals>...
2019-12-20 16:03:19
708
原创 本机搭建ftp服务器
1、打开windows功能中的ftp服务器和Web管理工具。2、在计算机管理中增加ftp站点。3、登录时需要输入本机的用户名和密码,可增加一个ftp专用用户。...
2019-12-18 14:40:42
272
原创 传中文参数问题
使用get方式,也就是在<a href="">中直接传参数,参数值为中文,在chrome中没问题,在ie和360浏览器中有问题,解决方案:在后台将参数 编码URLEncoder.encode(keyword, “UTF-8”);在接收参数时,无需转码。(URLDecoder.decode(keyword, “UTF-8”);)...
2019-12-16 15:26:47
321
原创 MyBatis 使用
1、jdbcType=”DATE” 忽略时分秒, 无论是否有时分秒,都设置为了 00:00:00;而jdbcType=”TIMESTAMP” 则 年月日时分秒全部设置,没有忽略。实际应用中,无需特意指定 jdbcType。2、实现likeconcat(concat('%', #{name}),'%')3、设变量<sql id="ColumnList"> ...
2019-12-13 16:25:02
115
原创 resultMap中的column和property
column对应sql中的列名property对应pojo中的属性名,也就是说property是column的别名。
2019-12-13 11:05:26
8214
原创 mybatis使用concat,报错:nested exception is java.sql.SQLSyntaxErrorException: ORA-00909: 参数个数无效
concat一次连接两个字符:例子如下:select * from birthday where name like concat(concat('%',#{name}),'%')如果直接写concat('%', #{name}, '%'),会报错!### The error occurred while setting parameters### SQL: SELECT c...
2019-12-12 10:02:05
2394
原创 背包(0-1)问题(动态规划)
背包容量是C,可容纳N件商品,每件商品要么放要么不放,商品的重量数组W[ ],价值数组V[ ]。通过动态规划算法,建立矩阵M[N][C]。M[i][j]的含义为,往背包里放从1~i的物品的最大价值,j为背包容量。M[i][j]的有两种选择:一是,不放当前物品i,M[i-1][j];二是,放当前物品i,则值为V[i]+M[i-1][j-W[i]]。也就是当前物品的价值加上,背包容量为...
2019-12-09 17:26:55
95
原创 LocalDateTime获得星期几
Java8中新引入的类LocalDateTime LocalDateTime currentTime = LocalDateTime.now(); System.out.println("当前时间:" + currentTime); System.out.println("week is " + currentTime.getDayOfWeek...
2019-12-03 16:28:20
9557
原创 SpringBoot加单元测试
1、SpringBoot版本 2.1.9,在创建工程时已默认添加,使用的是Junit4。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test<...
2019-11-29 17:29:26
174
原创 日志注解 @Slf4j
1、在IDEA中安装插件 lombok2、在pom.xml中增加 <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </depend...
2019-11-29 15:58:57
2689
原创 java.lang.IllegalArgumentException: DOCTYPE clause cannot have a non-null PUBLIC ID and a null SYSTE
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">改为<!DOCTYPE html>即可
2019-11-28 10:04:15
2406
3
原创 Mybatis generator自动生成mapper、xml和pojo
1、修改pom.xml<!-- MyBatis Generator --> <plugin> <groupId>org.mybatis.generator</groupId> <artifactId>mybatis-generator-maven...
2019-11-25 16:59:58
212
原创 springboot+mybatis上传图片保存到数据库,以及读取并在页面显示
1、mapper.xml文件<insert id="insertOne" parameterType="java.util.Map"> insert into imgtest (img) values (#{img, jdbcType=BLOB})</insert>2、pojo里,类型为byte[]3、controller存数据库 ...
2019-11-22 17:16:51
7452
1
原创 那些犯过的错误
1、把mapper文件夹放在了static下,导致找不到。2、Application的注解,本应该是MapperScan,写成了ComponentScan,导致Controller找不到。3、log4j日志文件没生成,因为在pom.xml的<groupId>org.springframework.boot</groupId><artifactId>...
2019-11-22 16:54:19
122
原创 IDEA中安装Android SDK
Preparing "Install Android Support Repository (revision: 47.0.0)".Downloading https://dl.google.com/android/repository/android_m2repository_r47.zip"Install Android Support Repository (revision: 47....
2019-11-20 17:28:18
2610
原创 项目总结
1、判空指针很重要!2、单元测试很必要,在和前台vue接时才发现一些小错误还存在,比如sql语句的参数没有用逗号分隔,方法中少赋值一个参数等等。3、Thymeleaf应用汇总:1)map遍历:<li th:each="menu:${menuMap}"> <a th:href="${menu.key.url}" th:text="${menu.key.na...
2019-11-15 10:10:10
115
原创 Springboot打war包
1、首先修改pom.xml文件增加:<packaging>war</packaging>修改依赖,添加依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-b...
2019-11-12 10:20:05
112
转载 Unable to start LiveReload server
问题:在使用SpringBoot 热部署插件devtools,同时启动多个Application时,控制台会报这个警告:经查询,发现DevToolsProperties中配置了一个端口,默认是35729,原因就在这里,多个端口冲突了,导致后边的热部署插件不生效.解决方案:在application.properties文件中加上以下配置#指定端口,具体视自己情况而定,只要不重复就可...
2019-11-08 10:11:49
2281
原创 懂原理很重要
前几天对接前台vue,增加了一个跨域配置,public class CORSConfiguration extends WebMvcConfigurationSupport { @Override protected void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**")...
2019-11-07 14:47:09
452
原创 springboot项目上传图片并回显
1、html页<!DOCTYPE html><html lang="zh-CN" xmlns:th="http://www.thymeleaf.org"> <head> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8 "> ...
2019-11-04 17:02:42
2646
4
原创 springboot项目添加分页插件
1、添加分页插件,SpringBoot版本 2.1.9,使用1.2.12出错,使用1.2.10版本正常。使用<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> <versi...
2019-11-04 09:40:51
912
原创 springboot增加登录拦截
@Componentpublic class LoginInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exce...
2019-11-01 16:39:16
134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人