- 博客(13)
- 资源 (3)
- 收藏
- 关注
原创 Java获取当前时间及提取年月日
Date date = new Date();Calendar calendarInsert = Calendar.getInstance();calendarInsert.setTime(date);int year = calendar.get(Calendar.YEAR);int month = calendar.get(Calendar.MONTH) + 1;int date = calendar.get(Calendar.DATE);
2020-12-16 15:11:31
1066
原创 Failed to convert value of type ‘java.lang.String‘ to required type ‘java.util.Date‘
Failed to convert value of type ‘java.lang.String’ to required type ‘java.util.Date’springboot在controller层的GET接口中接受java.util.Date类型参数,发生Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'错误需要在controller接口中格式化接收的Date,如图修改
2020-12-15 14:21:34
683
原创 shiro登陆时密码加盐哈希实现和简单原理
shiro登陆时密码加盐哈希实现转载请注明出处实现废话不多说,开搞。此篇采用SHA-256哈希算法,采用其他算法只需要更改算法名字段。1.在shiro配置中添加对于HashedCredentialsMatcher的配置 @Bean public HashedCredentialsMatcher hashedCredentialsMatcher(){ HashedCredentialsMatcher hashedCredentialsMatcher = new Hashed
2020-11-19 17:44:23
933
2
原创 mybatisx和idea无法识别特定名字的xml文件
mybatisx和idea无法识别特定名字的xml文件今天创建mybatis时创建了xml文件,实际运行没有问题,但是检测一直出问题,强迫症很难受。如图:处理办法:在setting中按图找到对应的选项,如SlideMapper.xml,点击右侧的删除,然后点应用。ok!解决啦!...
2020-10-20 18:47:27
1138
3
原创 Optional<T>
optional< T >官方文档A container object which may or may not contain a non-null value.If a value is present, isPresent() will return true and get() will return the value.一个可以通过isPresent()判断内部是否存在实例的容器,同时通过get()获取内部实例。通过使用Optional类可以避免因避免NullPointerE
2020-09-24 15:24:14
400
原创 tinyradius创建radius包
tinyradius创建一个radius包RadiusPacket radiusPackage = RadiusPacket.createRadiusPacket(type); radiusPackage.setDictionary(); radiusPackage.setPacketType(); radiusPackage.setPacketIdentifier(); radiusPackage.setAuthenticator();
2020-09-23 10:05:49
562
原创 ReplayingDecoder<S>和ByteToMessageDecoder
ReplayingDecoder<>public abstract class ReplayingDecoderextends ByteToMessageDecoder能够在阻塞I/O中实现非阻塞的解码ReplayingDecoder和ByteToMessageDecoder的区别ReplayingDecoder中的decode()和decodeLast()方法使用时可以忽略数据的接收,即可以看做所有的数据都已经接收完毕,你不用去考虑收到的数据是否是可用的.下面分别使用ByteToM
2020-09-08 16:35:18
446
原创 jdk下载Oracle账号分享
jdk下载Oracle账号分享每次下载JDK都需要登录Oracle,注册和登录都是一件繁琐的事这里分享一个网站,提供了一些共享的jdk账号,????jdk共享账号
2020-09-05 19:27:42
1289
1
原创 读取pom.xml出现Could not transfer artifact org.springframework.boot:spring-boot-starter-par
这里写自定义目录标题读取pom.xml出现Could not transfer artifact org.springframework.boot:spring-boot-starter-par问题原因解决方法读取pom.xml出现Could not transfer artifact org.springframework.boot:spring-boot-starter-par本人因为重装系统,重新安装了idea,从github下载项目时pom大片爆红无法启动,尝试本地常见新项目同样爆红。maven
2020-09-05 17:54:12
21261
2
原创 二叉树的java实现以及基本操作
二叉树的java实现二叉树的数据结构基本操作二叉树的创建线索化测试二叉树的数据结构这里使用了lombok自动生成属性的set和get方法import lombok.Data;/** * @author ignohh * @date 2020-08-28 8:56 */@Datapublic class BinaryTreeNode { private String data; private BinaryTreeNode leftChild; private Bi
2020-09-01 13:37:18
248
原创 寻找成对数字组成的数组中的落单数字
/** * @author ignohh * @date 2020-08-26 15:08 * @description 寻找成对数字组成的数组中的落单数字 */public class FindAloneNum { public static void main(String[] args) { int N = 11; int[] nums = new int[N]; for (int i = 0; i < nums.length-1
2020-08-27 09:12:05
159
原创 寻找数组中唯一重复的一个数,用到亦或的交换和提取
/** * @author * @description 寻找数组中唯一重复的一个数,用到亦或的交换和提取 * @date 2020-08-26 13:55 */public class FindRepetitionNum { public static void main(String[] args) { int N = 11; int[] nums = new int[N]; for(int i = 0; i < nums.len
2020-08-27 09:08:23
173
原创 org.apache.maven.plugin.surefire.SurefirePlugin NOT Found
org.apache.maven.plugin.surefire.SurefirePlugin NOT Found从gitlab拉下来的项目,maven构建时一直显示org.apache.maven.plugin.surefire.SurefirePlugin not found根据网上的方法,检查了本地maven的repository中的surefire插件目录,jar包存在;删除目录让maven重新reload依然报错。解决方法:添加版本显式声明<plugin>
2020-08-25 09:33:22
11649
5
jasper-studio_6.14.0_windows_x86_64.exe
2020-08-24
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人