- 麻雀虽小,五脏俱全 - Java工具类库 - Hutool
waiter_chen
Hutool官网:https://www.hutool.cn官方参考文档:https://www.hutool.cn/docsAsetoftoolsthatkeepJavasweet.——Htool特点通过静态方法封装,类函数式语言般,降低学习成本,提高工作效率整合多方用户需求,减少代码搜索成本,避免网络上参差不齐的代码出现导致的bugutil包提供多方公用类和公用工具方法,节省开发封装时间,减少
- java解析csv文件工具类_解析.csv文件,Java工具类
米死胃生
java解析csv文件工具类
文件格式为.csv格式的文件,我们需要解析文件里面的数据,进行存储落库。这时就需要解析出.csv格式文件中的数据。我的方式是创建一个对象,对象属性与文件的表头一致,这样文件的解析结果就是一个关于这个对象的集合。maven依赖配置net.sourceforge.javacsvjavacsv2.0com.opencsvopencsv3.8工具类代码:packagecom.chuxin.fight.de
- 2018-08-23 Java工具类——全角半角字符相互转换
Albert陈凯
https://blog.csdn.net/xyw591238/article/details/51719747https://my.oschina.net/zjcx/blog/679604https://segmentfault.com/a/1190000010841143importorg.apache.commons.lang.StringUtils;/****提供对字符串的全角->半角,半
- Filter 实现过滤符合条件的请求并落库
绿皮龟
Java基础合集人工智能opencv数据挖掘语音识别计算机视觉java后端
其他系列文章导航Java基础合集数据结构与算法合集设计模式合集多线程合集分布式合集ES合集文章目录其他系列文章导航文章目录前言一、配置过滤器类二、定义数据表、实体类、Mapper2.1DDL2.2实体类2.3Mapper三、创建一个过滤器四、实现Nacos配置热更新五、自定义RequestWrapper六、容易踩的坑6.1Java工具类Mapper层报空指针6.2工具类中使用@Value给静态变量
- 【java工具类2】JAVA主要解决JSONObject转义符太多斜杠问题\\\\\\\,String太多斜杠怎么处理,替换\\\\\工具类工具方法解决办法,java太多\\\\\\解决
君子志邦
JSON格式:{\"日志\":\"2017-12-0212:03:19,\\\\\\\"elapsedRealtime\\\\\\\":\\\\\\\"1075259399471\\\\\\\",\\\\\\\"source0Id\\\\\\\":\\\\\\\"\\\\\\\",\\\\\\\"cheme\\\\\\\":\\\\\\\"false\\\\\\\",\\\\\\\"sourceF
- Java判断地图坐标(经度,纬度)是否在多边形区域或圆形区域内
rivercoder
javaredis地图坐标经度纬度
欢迎光临我的博客查看最新文章:https://river106.cn在地图上,可以使用经纬度确定一个位置,如上海体育场(121.449391,31.188228),如果知道了2个地点的经纬度,我们就能在地图上找到其位置及2点的距离,百度地图或高德地图提供了相应的服务;如果将多个坐标点连成多边形区域,如何判断某个坐标点是否在多边形区域内,如下工具类。Java工具类importjava.awt.geo
- 常用Java工具类:手机号脱敏,身份证号脱敏
阿咚do懂
常用Java工具类java开发语言后端
目录:1手机号脱敏2身份证号脱敏3姓名脱敏1手机号脱敏本案要求:手机号的保留前三后四,中间的为星号"*"//手机号码前三后四脱敏publicstaticStringmobileEncrypt(Stringmobile){if(StringUtils.isEmpty(mobile)||(mobile.length()!=11)){returnmobile;}returnmobile.replaceA
- 【Java工具类】OkHttp工具类
frcoder
Javajavaokhttp
com.squareup.okhttp3okhttp4.8.1com.alibabafastjson1.2.83packagecom.frcoder;importcom.alibaba.fastjson.JSON;importokhttp3.Call;importokhttp3.Callback;importokhttp3.FormBody;importokhttp3.MediaType;impo
- SpringBoot实战(二十六)集成SFTP
ACGkaka_
SpringBoot实战springboot后端java
目录一、SFTP简介二、SpringBoot集成2.1Maven依赖2.2application.yml配置2.3DemoController.java接口2.4SftpService.java2.5DemoServiceImpl.java实现类2.6SftpUtils.java工具类2.7执行结果1)上传文件2)下载文件3)重命名文件(移动)4)删除文件一、SFTP简介SFTP:全称Secure
- Java工具类库Hutool
令狐少侠2011
java
这里写目录标题一、简介二、包含组件三、常用功能演示2、时间工具DateUtil3、数字类工具NumberUtil4、身份认证工具IdcardUtil5、信息脱敏工具DesensitizedUtil6、字段校验工具Validator7、集合工具类CollStreamUtil一、简介Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数
- 提升编程效率的利器: 解析Google Guava库之集合篇BitMap(三)
地瓜伯伯
工具guavajava开发语言jvmspringcloudspringboot计算机网络
GoogleGuava库提供了大量高效、有用的Java工具类,其中BiMap是一种非常独特的映射结构。与传统的Map不同,BiMap保证了键和值都是唯一的,因此它提供了键到值以及值到键的双向映射。这种数据结构在处理需要双向查找的场景时非常有用。一、BiMap简介BiMap,全称BidirectionalMap,即双向映射,是一种特殊的数据结构,它可以同时支持根据键查找值和根据值查找键的操作,这意味
- 使用这些高效Java工具类享受开发乐趣
偏偏爱吃梨
Java扩展java
使用这些高效Java工具类享受开发乐趣导语在Java中,工具类定义了一组公共方法,这篇文章将介绍Java中使用最频繁及最通用的Java工具类。在开发中,使用这些工具类,不仅可以提高编码效率,还可以提高代码可读性。一,org.apache.commons.lang.StringUtilsisBlank:字符串是否为空(trim后判断)isEmpty:字符串是否为空(不trim并判断)equals:字
- java工具类库-----Hutool
我是来人间凑数的
java#基础java
Hutool介绍Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅。对文件、流、加密解密、转码、正则、线程、XML等JDK方法进行封装,组成各种Util工具类。提供一下组件:hutool-aopJDK动态代理封装,提供非IOC下的切面支持hutool-bloomFilter布隆过滤,提供一些Hash算法的布隆过滤h
- 整理收集的一些常用java工具类
Java架构学习者
1.json转换工具packagecom.taotao.utils;importjava.util.List;importcom.fasterxml.jackson.core.JsonProcessingException;importcom.fasterxml.jackson.databind.JavaType;importcom.fasterxml.jackson.databind.JsonN
- Java工具类:将xml转为Json
天黑请闭眼
Java工具类JSONjavaxmljson
目录一、场景二、工具类三、测试类四、测试结果一、场景在对接第三方接口时,由于接口返回的并不是常见的Json,而是XML,所以需要将XML转为Json,方便后续处理二、工具类packagecom.xxx.util;importorg.apache.commons.lang.StringUtils;importorg.dom4j.Document;importorg.dom4j.Element;imp
- Java工具类:使用RestTemplate请求WebService接口
天黑请闭眼
Java工具类java
目录一、场景二、工具类一、场景对接第三方提供的WebService接口,早期的调用方式过于复杂繁琐,所以使用RestTemplate进行调用二、工具类packagecom.xxx.util;importorg.slf4j.Logger;importorg.slf4j.LoggerFactory;importorg.springframework.http.HttpEntity;importorg.
- android自动生成dimens适配文件,无需Java工具类
성간 조각
androidstudioandroid
**android自动生成dimens适配文件**在编写ui界面时因为手机分辨率大小不同,所以展现出来的效果也是不同的,这个时候就需要考虑适配器,让根据手机分辨率自动适配相应尺寸来展示界面,可以提高用户的体验感。1.首先安装插件ScreenMatch,安装成功之后androidstudio会提示重启2.在res->values下创建一个dimens文件,将以下代码复制进去。如果不创建这个文件一下操
- Spring 计时器StopWatch
在奋斗的大道
Spring(基础篇)springjava前端
背景在做开发的时候需要记录每个任务执行时间,或者记录一段代码执行时间,简单且粗暴的方法就是打印当前时间与执行完时间的差值,然后这样如果执行大量测试的话就很麻烦,并且不直观,如果想对执行的时间做进一步控制,则需要在程序中很多地方修改,目前spring-framework提供了一个StopWatch类可以做类似任务执行时间控制,也就是封装了一个对开始时间,结束时间记录操作的Java工具类。实例代码pa
- Java工具类——日期相关的类
良许Linux
前言在日常的开发工作当中,我们经常需要用到日期相关的类(包括日期类已经处理日期的类),所以,我就专门整理了一篇关于日期相关的类,希望可以帮助到大家。正文一、日期类介绍在Java里面,操作日期的类主要有以下几个类:工具类所属包继承关系实现接口Date类java.util包,需要导包默认继承ObjectSerializable,Cloneable,ComparableSimpleDateFormat类
- Java工具类——json字符串格式化处理
陈皮太
javajava
在我们拿到一团未经格式化的json字符串时,非常不方便查看,比如这样{"APP_HEAD":{"TOTAL_NUM":"-1","PGUP_OR_PGDN":"0"},"SYS_HEAD":{"RET":[{"RET_CODE":"000000","RET_MSG":"000000SUCCESS"},{"RET_CODE":"000001","RET_MSG":"000001SUCCESS"}],
- Java 日志
十⑧
通用的知识Java学习笔记javalog4jslf4jlogbacklog4j2
目录日志门面与实现框架日志门面日志实现框架总结SLF4j+Logback的实现第一步:添加配置文件logback.xmlLogTool.java工具类(非必要)依赖导入Java程序SpringBoot项目测试其他的日志门面与实现框架日志门面:提供统一的日志输出接口。日志实现:具体实现日志输出的代码。日志门面与实现框架使用日志门面+日志实现框架的方式,是为了:低耦合,日志的实现与业务代码通过日志门面
- Java导出Word文档的实现
keep one's resolveY
Java基础知识javaservletjvm
在日常的开发工作中,我们时常会遇到导出Word文档报表的需求,比如公司的财务报表、医院的患者统计报表、电商平台的销售报表等等。导出Word方式多种多样,通常有以下几种方式:1.使用第三方Java工具类库Hutool的Word工具类,参考网址为https://www.hutool.cn/docs/#/poi/Word生成-Word07Writer;2.利用ApachePOI和FreeMarker模板
- Java 实现音频添加自定义时长静音(附代码) | Java工具类
IT祖师爷
前言wav音频添加自定义时长静音的工具类Maven依赖com.google.guavaguava30.1.1-jrecn.hutoolhutool-all5.5.2代码packageai.guiji.csdn.tools;importcn.hutool.core.io.FileUtil;importcn.hutool.core.io.IoUtil;importcn.hutool.core.util
- Java工具类:获取当前方法上一级、全部的调用者
天黑请闭眼
Java工具类java
目录一、场景二、工具类三、测试类四、测试结果一、场景在一些多线程的代码逻辑中,一个方法可能会被很多不同的线程所调用,如果没办法知道该方法具体的调用者,在通过日志排查问题时,日志会非常难以分析解决:可以在打印日志时,将方法的上一级调用者打印出来二、工具类/***堆栈相关工具类**@authorhcs*@date2023/8/2114:05*/publicclassStackTraceUtils{/*
- mysql(26) : mysql8轻量java工具类
Lxinccode
mysql工具类mysql封装
maven依赖mysqlmysql-connector-java8.0.18importjava.sql.*;importjava.util.LinkedList;importjava.util.List;/***@Auther:liyue*@Date:2021/4/2118:10*@Description:*/publicclassMysqlUtil{privatestaticfinalStri
- JNA
JunChow520
JNA(JavaNativeAccess)是建立在JNI(JavaNativeInterface,Java本地调用)技术之上的Java开源框架,JNA提供了一组Java工具类用于在运行期间动态访问系统本地库(NativeLibrary,如Windows的动态链接库*.dll、Linux的共享库*.so)。使用JNA开发后无需编写任何Native/JNI代码,只需在Java接口中描述目标Native
- 「Java工具类」BeanCopyUtil对象复制工具类
程序员阿宁
Java工具类javajava工具类对象复制java对象复制工具类
介绍语本号主要是Java常用关键技术点,通用工具类的分享;以及springboot+springcloud+Mybatisplus+druid+mysql+redis+swagger+maven+docker等集成框架的技术分享;datax、kafka、flink等大数据处理框架的技术分享。文章会不断更新,欢迎码友关注点赞收藏转发!望各位码友点击关注,冲1000粉。后面会录制一些视频教程,图文和视
- 一个小而全的Java工具类库 | Hutool
陈言懒调
hutool.pngHutool是什么Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。Hutool中的工具方法来自每个用户的精雕细琢,它涵盖了Java开发底层代码中的方方面面,它既是大型项目开发中解决小问题的利器,也是小型项目中的效率担当;Hutool是项目中“util”包友好的
- 排名前16的Java工具类
alterem
在Java中,工具类定义了一组公共方法,这篇文章将介绍Java中使用最频繁及最通用的Java工具类。以下工具类、方法按使用流行度排名,参考数据来源于Github上随机选取的5万个开源项目源码。一.org.apache.commons.io.IOUtilscloseQuietly:关闭一个IO流、socket、或者selector且不抛出异常,通常放在finally块toString:转换IO流、U
- HuTool 工具类简单使用
大鵬
javajava
官方文档https://hutool.cn/docs/#/简介Hutool是一个小而全的Java工具类库,通过静态方法封装,降低相关API的学习成本,提高工作效率,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。Hutool中的工具方法来自于每个用户的精雕细琢,它涵盖了Java开发底层代码中的方方面面,它既是大型项目开发中解决小问题的利器,也是小型项目中的效率担当;Hutool是
- ios内付费
374016526
ios内付费
近年来写了很多IOS的程序,内付费也用到不少,使用IOS的内付费实现起来比较麻烦,这里我写了一个简单的内付费包,希望对大家有帮助。
具体使用如下:
这里的sender其实就是调用者,这里主要是为了回调使用。
[KuroStoreApi kuroStoreProductId:@"产品ID" storeSender:self storeFinishCallBa
- 20 款优秀的 Linux 终端仿真器
brotherlamp
linuxlinux视频linux资料linux自学linux教程
终端仿真器是一款用其它显示架构重现可视终端的计算机程序。换句话说就是终端仿真器能使哑终端看似像一台连接上了服务器的客户机。终端仿真器允许最终用户用文本用户界面和命令行来访问控制台和应用程序。(LCTT 译注:终端仿真器原意指对大型机-哑终端方式的模拟,不过在当今的 Linux 环境中,常指通过远程或本地方式连接的伪终端,俗称“终端”。)
你能从开源世界中找到大量的终端仿真器,它们
- Solr Deep Paging(solr 深分页)
eksliang
solr深分页solr分页性能问题
转载请出自出处:http://eksliang.iteye.com/blog/2148370
作者:eksliang(ickes) blg:http://eksliang.iteye.com/ 概述
长期以来,我们一直有一个深分页问题。如果直接跳到很靠后的页数,查询速度会比较慢。这是因为Solr的需要为查询从开始遍历所有数据。直到Solr的4.7这个问题一直没有一个很好的解决方案。直到solr
- 数据库面试题
18289753290
面试题 数据库
1.union ,union all
网络搜索出的最佳答案:
union和union all的区别是,union会自动压缩多个结果集合中的重复结果,而union all则将所有的结果全部显示出来,不管是不是重复。
Union:对两个结果集进行并集操作,不包括重复行,同时进行默认规则的排序;
Union All:对两个结果集进行并集操作,包括重复行,不进行排序;
2.索引有哪些分类?作用是
- Android TV屏幕适配
酷的飞上天空
android
先说下现在市面上TV分辨率的大概情况
两种分辨率为主
1.720标清,分辨率为1280x720.
屏幕尺寸以32寸为主,部分电视为42寸
2.1080p全高清,分辨率为1920x1080
屏幕尺寸以42寸为主,此分辨率电视屏幕从32寸到50寸都有
适配遇到问题,已1080p尺寸为例:
分辨率固定不变,屏幕尺寸变化较大。
如:效果图尺寸为1920x1080,如果使用d
- Timer定时器与ActionListener联合应用
永夜-极光
java
功能:在控制台每秒输出一次
代码:
package Main;
import javax.swing.Timer;
import java.awt.event.*;
public class T {
private static int count = 0;
public static void main(String[] args){
- Ubuntu14.04系统Tab键不能自动补全问题解决
随便小屋
Ubuntu 14.04
Unbuntu 14.4安装之后就在终端中使用Tab键不能自动补全,解决办法如下:
1、利用vi编辑器打开/etc/bash.bashrc文件(需要root权限)
sudo vi /etc/bash.bashrc
接下来会提示输入密码
2、找到文件中的下列代码
#enable bash completion in interactive shells
#if
- 学会人际关系三招 轻松走职场
aijuans
职场
要想成功,仅有专业能力是不够的,处理好与老板、同事及下属的人际关系也是门大学问。如何才能在职场如鱼得水、游刃有余呢?在此,教您简单实用的三个窍门。
第一,多汇报
最近,管理学又提出了一个新名词“追随力”。它告诉我们,做下属最关键的就是要多请示汇报,让上司随时了解你的工作进度,有了新想法也要及时建议。不知不觉,你就有了“追随力”,上司会越来越了解和信任你。
第二,勤沟通
团队的力
- 《O2O:移动互联网时代的商业革命》读书笔记
aoyouzi
读书笔记
移动互联网的未来:碎片化内容+碎片化渠道=各式精准、互动的新型社会化营销。
O2O:Online to OffLine 线上线下活动
O2O就是在移动互联网时代,生活消费领域通过线上和线下互动的一种新型商业模式。
手机二维码本质:O2O商务行为从线下现实世界到线上虚拟世界的入口。
线上虚拟世界创造的本意是打破信息鸿沟,让不同地域、不同需求的人
- js实现图片随鼠标滚动的效果
百合不是茶
JavaScript滚动属性的获取图片滚动属性获取页面加载
1,获取样式属性值
top 与顶部的距离
left 与左边的距离
right 与右边的距离
bottom 与下边的距离
zIndex 层叠层次
例子:获取左边的宽度,当css写在body标签中时
<div id="adver" style="position:absolute;top:50px;left:1000p
- ajax同步异步参数async
bijian1013
jqueryAjaxasync
开发项目开发过程中,需要将ajax的返回值赋到全局变量中,然后在该页面其他地方引用,因为ajax异步的原因一直无法成功,需将async:false,使其变成同步的。
格式:
$.ajax({ type: 'POST', ur
- Webx3框架(1)
Bill_chen
eclipsespringmaven框架ibatis
Webx是淘宝开发的一套Web开发框架,Webx3是其第三个升级版本;采用Eclipse的开发环境,现在支持java开发;
采用turbine原型的MVC框架,扩展了Spring容器,利用Maven进行项目的构建管理,灵活的ibatis持久层支持,总的来说,还是一套很不错的Web框架。
Webx3遵循turbine风格,velocity的模板被分为layout/screen/control三部
- 【MongoDB学习笔记五】MongoDB概述
bit1129
mongodb
MongoDB是面向文档的NoSQL数据库,尽量业界还对MongoDB存在一些质疑的声音,比如性能尤其是查询性能、数据一致性的支持没有想象的那么好,但是MongoDB用户群确实已经够多。MongoDB的亮点不在于它的性能,而是它处理非结构化数据的能力以及内置对分布式的支持(复制、分片达到的高可用、高可伸缩),同时它提供的近似于SQL的查询能力,也是在做NoSQL技术选型时,考虑的一个重要因素。Mo
- spring/hibernate/struts2常见异常总结
白糖_
Hibernate
Spring
①ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldException
缺少aspectjweaver.jar,该jar包常用于spring aop中
②java.lang.ClassNotFoundException: org.sprin
- jquery easyui表单重置(reset)扩展思路
bozch
formjquery easyuireset
在jquery easyui表单中 尚未提供表单重置的功能,这就需要自己对其进行扩展。
扩展的时候要考虑的控件有:
combo,combobox,combogrid,combotree,datebox,datetimebox
需要对其添加reset方法,reset方法就是把初始化的值赋值给当前的组件,这就需要在组件的初始化时将值保存下来。
在所有的reset方法添加完毕之后,就需要对fo
- 编程之美-烙饼排序
bylijinnan
编程之美
package beautyOfCoding;
import java.util.Arrays;
/*
*《编程之美》的思路是:搜索+剪枝。有点像是写下棋程序:当前情况下,把所有可能的下一步都做一遍;在这每一遍操作里面,计算出如果按这一步走的话,能不能赢(得出最优结果)。
*《编程之美》上代码有很多错误,且每个变量的含义令人费解。因此我按我的理解写了以下代码:
*/
- Struts1.X 源码分析之ActionForm赋值原理
chenbowen00
struts
struts1在处理请求参数之前,首先会根据配置文件action节点的name属性创建对应的ActionForm。如果配置了name属性,却找不到对应的ActionForm类也不会报错,只是不会处理本次请求的请求参数。
如果找到了对应的ActionForm类,则先判断是否已经存在ActionForm的实例,如果不存在则创建实例,并将其存放在对应的作用域中。作用域由配置文件action节点的s
- [空天防御与经济]在获得充足的外部资源之前,太空投资需有限度
comsci
资源
这里有一个常识性的问题:
地球的资源,人类的资金是有限的,而太空是无限的.....
就算全人类联合起来,要在太空中修建大型空间站,也不一定能够成功,因为资源和资金,技术有客观的限制....
&
- ORACLE临时表—ON COMMIT PRESERVE ROWS
daizj
oracle临时表
ORACLE临时表 转
临时表:像普通表一样,有结构,但是对数据的管理上不一样,临时表存储事务或会话的中间结果集,临时表中保存的数据只对当前
会话可见,所有会话都看不到其他会话的数据,即使其他会话提交了,也看不到。临时表不存在并发行为,因为他们对于当前会话都是独立的。
创建临时表时,ORACLE只创建了表的结构(在数据字典中定义),并没有初始化内存空间,当某一会话使用临时表时,ORALCE会
- 基于Nginx XSendfile+SpringMVC进行文件下载
denger
应用服务器Webnginx网络应用lighttpd
在平常我们实现文件下载通常是通过普通 read-write方式,如下代码所示。
@RequestMapping("/courseware/{id}")
public void download(@PathVariable("id") String courseID, HttpServletResp
- scanf接受char类型的字符
dcj3sjt126com
c
/*
2013年3月11日22:35:54
目的:学习char只接受一个字符
*/
# include <stdio.h>
int main(void)
{
int i;
char ch;
scanf("%d", &i);
printf("i = %d\n", i);
scanf("%
- 学编程的价值
dcj3sjt126com
编程
发一个人会编程, 想想以后可以教儿女, 是多么美好的事啊, 不管儿女将来从事什么样的职业, 教一教, 对他思维的开拓大有帮助
像这位朋友学习:
http://blog.sina.com.cn/s/articlelist_2584320772_0_1.html
VirtualGS教程 (By @林泰前): 几十年的老程序员,资深的
- 二维数组(矩阵)对角线输出
飞天奔月
二维数组
今天在BBS里面看到这样的面试题目,
1,二维数组(N*N),沿对角线方向,从右上角打印到左下角如N=4: 4*4二维数组
{ 1 2 3 4 }
{ 5 6 7 8 }
{ 9 10 11 12 }
{13 14 15 16 }
打印顺序
4
3 8
2 7 12
1 6 11 16
5 10 15
9 14
13
要
- Ehcache(08)——可阻塞的Cache——BlockingCache
234390216
并发ehcacheBlockingCache阻塞
可阻塞的Cache—BlockingCache
在上一节我们提到了显示使用Ehcache锁的问题,其实我们还可以隐式的来使用Ehcache的锁,那就是通过BlockingCache。BlockingCache是Ehcache的一个封装类,可以让我们对Ehcache进行并发操作。其内部的锁机制是使用的net.
- mysqldiff对数据库间进行差异比较
jackyrong
mysqld
mysqldiff该工具是官方mysql-utilities工具集的一个脚本,可以用来对比不同数据库之间的表结构,或者同个数据库间的表结构
如果在windows下,直接下载mysql-utilities安装就可以了,然后运行后,会跑到命令行下:
1) 基本用法
mysqldiff --server1=admin:12345
- spring data jpa 方法中可用的关键字
lawrence.li
javaspring
spring data jpa 支持以方法名进行查询/删除/统计。
查询的关键字为find
删除的关键字为delete/remove (>=1.7.x)
统计的关键字为count (>=1.7.x)
修改需要使用@Modifying注解
@Modifying
@Query("update User u set u.firstna
- Spring的ModelAndView类
nicegege
spring
项目中controller的方法跳转的到ModelAndView类,一直很好奇spring怎么实现的?
/*
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* yo
- 搭建 CentOS 6 服务器(13) - rsync、Amanda
rensanning
centos
(一)rsync
Server端
# yum install rsync
# vi /etc/xinetd.d/rsync
service rsync
{
disable = no
flags = IPv6
socket_type = stream
wait
- Learn Nodejs 02
toknowme
nodejs
(1)npm是什么
npm is the package manager for node
官方网站:https://www.npmjs.com/
npm上有很多优秀的nodejs包,来解决常见的一些问题,比如用node-mysql,就可以方便通过nodejs链接到mysql,进行数据库的操作
在开发过程往往会需要用到其他的包,使用npm就可以下载这些包来供程序调用
&nb
- Spring MVC 拦截器
xp9802
spring mvc
Controller层的拦截器继承于HandlerInterceptorAdapter
HandlerInterceptorAdapter.java 1 public abstract class HandlerInterceptorAdapter implements HandlerIntercep