
java
ignoHH
这个作者很懒,什么都没留下…
展开
-
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 · 1069 阅读 · 0 评论 -
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 · 687 阅读 · 0 评论 -
shiro登陆时密码加盐哈希实现和简单原理
shiro登陆时密码加盐哈希实现转载请注明出处实现废话不多说,开搞。此篇采用SHA-256哈希算法,采用其他算法只需要更改算法名字段。1.在shiro配置中添加对于HashedCredentialsMatcher的配置 @Bean public HashedCredentialsMatcher hashedCredentialsMatcher(){ HashedCredentialsMatcher hashedCredentialsMatcher = new Hashed原创 2020-11-19 17:44:23 · 939 阅读 · 2 评论 -
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 阅读 · 0 评论 -
jdk下载Oracle账号分享
jdk下载Oracle账号分享每次下载JDK都需要登录Oracle,注册和登录都是一件繁琐的事这里分享一个网站,提供了一些共享的jdk账号,????jdk共享账号原创 2020-09-05 19:27:42 · 1290 阅读 · 1 评论