指纹自动登录实战
在一个项目中需要指纹登录系统,比如自助的仓库管理系统,用户自己刷指纹开门,系统检测到这一行为进行自动登录系统;用户接下来可以在系统中刷RFID进行借取操作。
准备工作
采购的是中控一体机,刷卡指纹等
B/S端调用
服务端调用
jacob
https://mvnrepository.com/artifact/net.sf.jacob-project/jacob
大约 2 分钟
在一个项目中需要指纹登录系统,比如自助的仓库管理系统,用户自己刷指纹开门,系统检测到这一行为进行自动登录系统;用户接下来可以在系统中刷RFID进行借取操作。
采购的是中控一体机,刷卡指纹等
https://mvnrepository.com/artifact/net.sf.jacob-project/jacob
在一个项目中使用了flotJS, 填坑小结。
它的官网貌似都已经关闭了,无人维护了。
Flot chart学习笔记 https://www.cnblogs.com/GunYi/p/4076935.html
给我的文档系统添加了导出,本文记录PDF填坑小结。
@RequestMapping(value = "export")
public void exportPdfNew(String mdContent, String type, HttpServletResponse response) {
	response.reset();
	response.setContentType("multipart/form-data");
	String title = "file";
	String author = "gavin";
	String mdFileContent = "";
	ServletOutputStream out = null;
	try {
		byte[] fileBytes = null;
		
		String htmlFile = StringEscapeUtils.unescapeHtml4(mdContent);
		
		String cleanedHtmlFile = htmlFile.replace("<img", "<img style=\"display:inline-block;width:100%;max-width:650px;\" ");
		cleanedHtmlFile = cleanHtml(cleanedHtmlFile);
		fileBytes = convert(author, cleanedHtmlFile);
		response.setHeader("Content-Disposition",
				"inline; filename=\"" + title + "_" + System.currentTimeMillis() + ".pdf\"");
			
		out = response.getOutputStream();
		out.write(fileBytes);
		out.close();
		out.flush();
	} catch (Exception e) {
		System.out.println(e);
	}
}
在项目中常需要修改或者填写密码,假设浏览器已经记住密码,常会通过autocomplete=off设置防止自动填充type=password的字段。但是大多数情况这样设置是无效的。
autocomplete的含义,官网参考如下:
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values
最近做的一些导出项目,需要使用图片资源,字体资源,证书,其它文件等;由于编译为jar并部署的,通常需要读取jar中的资源; 本文只要记录读取资源并通过jar方式运行和在开发IDE中运行的一致性。
public class Resource {  
    public  void getResource() throws IOException{  
        File file=new File("D:\\res.txt");  
        BufferedReader br=new BufferedReader(new FileReader(file));  
        String s="";  
        while((s=br.readLine())!=null)  
            System.out.println(s);  
    }  
}     
打包内容: Java,MySQL,Springboot JAR + 第三方dll组件。
对于一些简单的WEB应用,使用诸如java,SQL,JAR/WAR期望将其统一打包成一个EXE安装包进行安装,并将其注册为Windows的服务。
2019-03-14 JWS在新版本中要收费,我去他大爷的。配置起来这么麻烦,远不及winsw.