![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
实用小知识
学习达人的日记本
学习新技术,总结经验
展开
-
解决端口占用问题
tomcat 8080端口被占用了原创 2016-12-23 21:38:27 · 518 阅读 · 0 评论 -
表格水平和垂直居中
水平居中:text-align:center垂直居中:vertical-align: middle;行高:line-hight : 30px;原创 2017-09-27 09:12:58 · 881 阅读 · 0 评论 -
js数组中当Java集合的使用
html>html>head> meta charset="UTF-8"> title>创造集合练习title> script type="text/javascript" src="jquery-3.1.0.js">script>head>body>div> input type="checkbox" value="pingguo" onclick=原创 2017-09-20 22:24:40 · 332 阅读 · 0 评论 -
jdbctemplate中用in查询用法
试了半天,终于找到了JdbcTemplate中in的用法,JdbcTemplate自己不能使用in,借助NamedParameterJdbcTemplate 能实现in的用法@Autowiredprivate DataSource dataSource; //数据源注入即可使用public void assignBatch(List todoIds, String teamMem原创 2017-09-22 16:48:44 · 16428 阅读 · 0 评论 -
md5加密
import org.apache.commons.codec.digest.DigestUtils;DigestUtils.md5Hex(password)或者import org.springframework.util.DigestUtils;DigestUtils.md5Digest(password.getBytes())原创 2017-10-12 20:31:01 · 219 阅读 · 0 评论 -
Linux中unzip解压出现乱码,mismatching "local" filename和continuing with "central" filename version
Linux中unzip解压出现mismatching "local" filename和continuing with "central" filename version,是中文乱码问题,压缩文件中有中文命名的文件,解压出来就出现了乱码,解决方法:指定解压的文件格式:unzip -qO UTF-8 front.zip ,指定为utf-8格式,也可以指定为其他格式,就不会出现乱码了原创 2017-10-17 00:40:26 · 10138 阅读 · 0 评论 -
linux删除一个文件夹下面的多个文件夹
linux删除一个文件夹下面的多个文件夹Linux删除用 rm命令,删除不提示\rm1、若在当前目录下删除多个文件和文件夹可以直接删除:\rm -r fileUpload.jsp include res WEB-INF文件和文件夹之间用空格隔开2.要删除的文件和文件夹不在当前目录下,需要使用下面的方式删除删除命令:\rm -r test/day2/webap原创 2017-10-17 01:00:56 · 12080 阅读 · 0 评论 -
解决tomcat服务器跨域请求问题
--- 前沿-- 工作中项目进行前后端分离时,前段调用后端接口时会出现跨域问题在tomcat 的web.xml 配置文件中加入如下配置过滤器(如web.xml中有多个filter时要把下面配置放在最前端) CorsFilter org.apache.catalina.filters.CorsFilter cors.allowed.methods原创 2017-02-19 21:05:34 · 3216 阅读 · 0 评论 -
彻底解决Intellij IDEA/WebStorm2017.2 中文无法输入 中英文没法自由切换问题?
升级idea/webstrom2017.2之后,中英文不能切换,总是只能输入英文,下面给出解决方法方法: 1. 升级jdk至最新版本(以1.8.0_73为例),安装的过程中同时安装jre; 2. 关掉idea,然后去idea安装路径下把jre64文件夹重命名掉,或删掉,最好是重命名掉,出问题后还能恢复过来,下面的图片中是重命名成jre642了;如下图:3. 把Java安装路径下的jre1.8.0_转载 2017-12-07 14:29:03 · 3448 阅读 · 0 评论 -
怎么在请求方法之前绑定/修改参数值
1.继承或者实现WebMvcConfigurer相关类/接口①.spring5.0之前 继承WebMvcConfigurerAdapter类代码如下:@Configurationpublic class UserConfig extends WebMvcConfigurerAdapter { /** * 自定义的参数解析器 */ @Autow...原创 2019-01-28 20:20:54 · 844 阅读 · 0 评论 -
restTemplate发送post请求时修改请求头和上传文件
1.restTemplate发送post请求时修改请求头@PostMapping("/buyWater") public ObjectResult<String> buyWater(@RequestBody Food food) throws Exception { String url = "https://192.168.98.172/ConvertSer...原创 2019-01-28 20:30:01 · 7642 阅读 · 2 评论 -
Java中自定义异常的使用
1.先自定义异常类public class UserException extends Exception {private static final long serialVersionUID = 1L;public UserException() {super();}public UserException(String message, Throwab原创 2017-09-18 21:59:54 · 2352 阅读 · 0 评论 -
js中eval方法的使用
$('.input').focus(function() {var laberId = $(this).attr("id") + "Error";$('#'+laberId).text("");showError($('#'+laberId));});$('.input').blur(function() {var id = $(this).attr("id");/原创 2017-09-17 22:20:33 · 417 阅读 · 0 评论 -
ubuntu 出错 /etc/sudoers is world writable
如果改变了这个,目录的权限sodu就不能用了,当你再使用sodu命令就会爆如下问题:sudo: /etc/sudoers is world writablesudo: no valid sudoers sources found, quittingsudo: unable to initialize policy plugin这个是linux为保证系统安全所做的限制,解决方法: 在termi转载 2017-03-21 10:50:04 · 2749 阅读 · 3 评论 -
angular2跨域访问后台服务器数据
Angular2请求后台数据注意事项汪敏-2017/3/101.angular2请求后台数据:请求的url地址如下:private heroesUrl = 'http://localhost:8080/heroes.json';2.angular2请求模拟的服务器顺序如下: 访问的url如图:private heroesUrl =原创 2017-03-21 16:06:30 · 3306 阅读 · 0 评论 -
http请求出现406错误
http请求出现406错误 ##一般出现406错误有两种可能: 1、查看Jackson包是否存在。 spring MVC默认依赖Jackson包 2、如果后缀是html是不能响应json数据的。需要修改后缀名。 在做伪静态化过程中,以.html结尾的后缀,做post请求时,不能响应json格式,这是spring官方做出的处理 可以加一个后缀改为.action原创 2017-03-22 15:11:26 · 34925 阅读 · 0 评论 -
chrome浏览器的跨域设置——包括版本49前后两种设置
chrome浏览器的跨域设置——包括版本49前后两种设置做前后分离的webapp开发的时候,出于一些原因往往需要将浏览器设置成支持跨域的模式,好在chrome浏览器就是支持可跨域的设置,网上也有很多chrome跨域设置教程。但是新版本的chrome浏览器提高了跨域设置的门槛,原来的方法不再适用了。下面笔者简单介绍一下新版本chrome的跨域设置方法。版本号49之前的跨域设置先介绍一下老方法,参考转载 2017-03-23 12:05:00 · 875 阅读 · 0 评论 -
window10 微软小娜搜索不到内容
Win10自带的语音助手Cortana小娜可以帮我们省下很多文件或功能操作时间,小娜经常被用于搜索本地文件或应用程序等,有用户表示使用小娜的时间长了就会遇到无法搜索本地应用程序的问题。阅读下文了解Win10系统小娜搜索不到应用程序的处理方法。 操作步骤: 1、用管理员模式打开PowerShell,如果小娜不给你搜,你可以在开始菜单中找“Windows PowerShell原创 2017-07-12 14:02:02 · 5693 阅读 · 1 评论 -
正则表达式
js原创 2017-07-03 16:54:51 · 392 阅读 · 0 评论 -
jquery实现全选和反选
$("th #assignAll").on("click",function () { if ($(this).prop('checked')){ $(".assign").attr('checked',true); } else { $(".assig原创 2017-07-04 20:10:20 · 246 阅读 · 0 评论 -
Linux统计代码行数
Linux统计代码行数转载 2017-07-07 11:55:05 · 4921 阅读 · 1 评论 -
QC出现HP AML-client停止工作解决方法
QC出现HP AML-client停止工作是时间格式问题,调整时间格式为yyyy-MM-dd就行了原创 2017-08-02 09:11:12 · 2590 阅读 · 2 评论 -
Java解析属性配置文件并给占位符传参
//注册功能public void register(User user){//补齐数据user.setUid(CommonUtils.uuid());user.setStatus(false);user.setActivationCode(CommonUtils.uuid() + CommonUtils.uuid());try {userDao.save(user);原创 2017-09-17 22:05:37 · 2534 阅读 · 0 评论 -
com.github.junrar.exception.RarException: badRarArchive---rar5.0版解决方案
警告: exception in archive constructor maybe file is encrypted or curruptcom.github.junrar.exception.RarException: badRarArchive出现这种问题,在网上查找资料,发现,rar解压分5.0之前和5.0之后的版本,5.0之前的版本,可以通过代码实现解压,WinRAR5之后,在ra...原创 2019-03-15 10:43:56 · 12025 阅读 · 4 评论