
Java
书香代码
给自己提问题促使自己去学习
展开
-
静态代码块类加载时并不会执行
public class SCTest { public static void main(String[] args) throws ClassNotFoundException { /* static{ System.out.println("父类的静态代码块"); }*/ //JVM装载了Fu的类信息,但是没有实例化 SCTest.class.getClassLoader().loadClass("com.原创 2020-11-06 10:30:53 · 513 阅读 · 1 评论 -
Shiro密码凭证匹配设置
生成密码public class Sha256PasswordHelper { public static String encryption(String username, String pwd) { return new Sha256Hash(pwd, username,1024).toString(); }}散列算法配置,默认hex编码【这里的编配配置需和Sha256PasswordHelper 这里同步,我这里选择默认hex】@Bean pub原创 2020-08-07 11:46:16 · 478 阅读 · 0 评论 -
Shiro重新加载权限
package com.study.shiro;import com.github.pagehelper.util.StringUtil;import com.study.model.Resources;import com.study.model.User;import com.study.service.ResourcesService;import org.apache.shir...转载 2018-06-07 20:10:54 · 1554 阅读 · 0 评论 -
flying-saucer-pdf预览及下载
使用这个库的初衷找阿里编程规范的时候在github上搜索到的,觉得pdf像书籍一样的翻页比较自由,也是手痒吧。 启发开源项目github-pdf-demo国人的EditMD比较不错我弄了一个MarkDown写作页面是自己凑凑的看一下图: pdf模板页面<!DOCTYPE html><html><head ...原创 2018-06-19 13:44:06 · 3685 阅读 · 0 评论