
JAVA
文章平均质量分 81
FredLzy
热爱技术,热爱生活,热爱运动,希望认识更多志同道合的朋友,未来在那里,
不靠爹,因为我爸不是李刚,也不是什么部长,主任。
不靠辛苦劳动拼体力,因为我知道比不过那些刚毕业的学生,有生存的压力。
不靠拼财力,我没有家财万贯,也经不起无厘头的折腾,一点积蓄还待养老养子。
我靠人脉了,靠自己的圈子发财。我靠能力了,靠自己的知识谋生。我靠思想了,靠自己的经验取胜。
我很努力吗?我比的是耐力,不是冲刺力,这是经验的总结。
我拼人品吗?品行还不可以立传,但可以让身边的人舒服和愉悦。
快来认识我吧,最好约到酒吧见面,或者球场上较劲,或者找个安静的公园散步吧。
展开
-
怎么为你的springboot应用程序配置TLS和HTTP/2
使用TLS和HTTP/2保护SpringBoot应用程序现在,通过HTTPS(TLS)使用安全连接和更高效的HTTP/2协议应该是所有web应用程序的理所当然的事情。您可以从Let's Encrypt获取经过域验证的证书,而无需设置传输层安全性(TLS)。HTTP服务器和web浏览器已经广泛采用HTTP/2。从Java 9和Spring Boot 2/Spring 5开始,您可以轻松地让web应用程序使用安全的HTTPS/TLS连接和HTTP/2协议。作为一名开发人员,大部分时间您都在本地环境中工作翻译 2020-05-29 16:17:40 · 4674 阅读 · 0 评论 -
TLS1.2 TLS1.3握手协议区别和问题排查
修复internet用户和站点所有者的SSL/TLS握手失败错误现在是发表另一篇技术文章的时候了,今天我们将讨论SSL/TLS握手失败错误及其修复方法。与许多SSL错误消息一样,这可以从客户端和服务器端触发,因此有时可以由普通互联网用户修复,而其他时候则表明网站存在配置问题。不管它的起源如何,这都可能是一个令人沮丧的SSL错误,因为它阻止您与试图访问的网站建立安全连接。我们将了解SSL/TLS握手是什么,然后我们将介绍SSL/TLS握手失败错误的原因以及您可以做些什么来修复它。让我们好好想想翻译 2020-05-22 11:18:10 · 8053 阅读 · 1 评论 -
hibernate自定义生成主健
现在做的项目有一个需求:在不多维护一张表的情况下,自动生成主键,同sequence一样,而且要有一定的规范.比如,现在我们的规范是yymmddhhmmss+四位流水号.没有办法,只好对hibernate的主键生成做自定义.下面是我的代码,请多多指教.声明,我的hibernate的版本是:hibernate3.2自定义的时候,只对两个地方做了修改,一个是自己写了一个java类,实现了原创 2014-09-03 14:02:21 · 926 阅读 · 0 评论 -
系统信息收集API : Java Sigar
Sigar简介开源工具包 SIGAR - System Information Gatherer And Reporter,即 系统信息收集和报告。官方站点:https://support.hyperic.com/display/SIGAR/Home考虑到官网的不稳定,把相关系摘录如下:简单的说,他能收集的信息包括:System memory, swap, cpu,原创 2013-12-30 10:08:47 · 3047 阅读 · 0 评论 -
Thread.currentThread().getContextClassLoader() 和 Class.getClassLoader()的区别
一、同一工程中:String path = Thread.currentThread().getContextClassLoader().getResource(".").getPath(); System.out.println(path); String string = Sample1.class.getClassLoader().getResource("转载 2013-12-12 16:38:42 · 4262 阅读 · 0 评论 -
Troubleshot for SSL issue for Weblogic server
1> Signature verification failed because RSA key public exponent [3] is too small RSA Keys with Public Exponent results in faulty signature verification on WLS. Having so low exponent is considere原创 2013-12-11 11:50:00 · 1995 阅读 · 0 评论 -
_Java程序常见资源
作为不管你是什么级别的程序员,下面几个国外的技术网站你不得不收藏:1> 有问必答:http://stackoverflow.com/questions/2>寻找你所需要的开源jar包www.java2s.com/3>Oracle官网http://www.oracle.com/technetwork/java/javase/index.html4>Jquery UI原创 2013-12-02 11:18:19 · 1102 阅读 · 0 评论 -
Weblogic12c (12.1.2) 兼容性问题汇总
上篇文章介绍了Oracle WebLogic Server 12.1.2 新特性最近在部署应用的时候发现了一些新问题总结如下:1〉JDK 兼容性问题。我们可以通过http://www.oracle.com/technetwork/java/javase/7u25-relnotes-1955741.html#jar-att 查看各个JDK版本的新特性。选择下载各版本的JDK : http://www.oracle.com/technetwork/java/javase/downloads/java原创 2013-10-09 11:49:41 · 17828 阅读 · 0 评论 -
分析Java死锁:分析jstack日志
I write two blogs in this series, part 1 and part 2, I’ve demonstrated how to create a piece of bad code that deadlocks and then used this code to show three ways of taking a thread dump. In this翻译 2013-10-09 14:28:49 · 5067 阅读 · 0 评论 -
Hyperic Agent 安装配置报 - No token file found, waiting for Agent to initialize
* Stop the agent Windows service.* Make sure all the agent processes are down - wrapper and Java processes.* Verify that the the path %SystemRoot%\TEMP exist in themachine.* If it exists, remov原创 2013-10-09 14:13:23 · 2016 阅读 · 0 评论 -
2013年最新的24款jquery插件
总结了几款最近的jquery 插件,希望你能有所了解,并对你的工作带来帮助。1> jQRangeSider: 一个jQuery插件帮助你生成区域选择控件 2> 一个帮助你生成iOS应用目录风格的jQuery插件:App-Folders使用这个插件可能帮助你创建iOS风格的目录展示和隐藏效果,如果你是个iOS用户的话,一定对于这个效果不陌生!3> 实用的多级菜原创 2013-10-04 18:00:27 · 2320 阅读 · 3 评论 -
Firefox和IE兼容性问题及解决方法
在开发多语言java 网站的过程中,发现不少FF中可以正常运行的代码,可是在IE中不行,反之亦然。IE和Firefox(火狐)在JavaScript方面的不兼容及统一方法总结如下:1.兼容firefox的 outerHTML,FF中没有outerHtml的方法。if (window.HTMLElement) { HTMLElement.prototype.__defineSetter_原创 2013-10-08 10:37:33 · 2093 阅读 · 0 评论 -
Hyperic HQ架构概述
Hyperic HQ是一个基于Java的软件资源监测和管理平台。体系结构的关键要素是HQ Server,可用于集中管理和持久性存储,以及HQ Agent,提供了对每个监测平台基础地监测和控制。1.HQ AgentHQ Agent可以运行在想要使用Hyperic HQ管理的每一台机器上。在第一次启动时,agent自动发现机器上运行的软件,并定期重新扫描配置的更改。HQ agent收集可用转载 2013-01-17 11:30:47 · 5533 阅读 · 1 评论 -
Run JavaScript files on the server side
Summary: Combine JavaScript with Java? code on the server to get the freedom to use the same JavaScript routines on both servers and clients. In addition, the techniques presented throughout this ser转载 2013-08-26 13:33:59 · 1388 阅读 · 0 评论 -
Java InputMethod 实现
Jre1.7对输入法的支持使得java开发者能够方便地使用JAVA编写输入法,并整合适配了本地输入法,然后提供出一个在所有输入法中切换的菜单界面,并在以后的编辑文本过程中实现了一个高效的事件处理框架,最终实现了方便地利用输入法进行输入的用户体验。一.编写Java输入法及切换输入法支持。利用JAVA编写输入法只需实现两个核心接口:InputMethod,InputMethodDesc转载 2013-05-06 10:26:45 · 3448 阅读 · 0 评论 -
Struts 2 + Spring + Hibernate integration Tutorial
Download it –Struts2-Spring-Hibernate-Integration-Example.zipIn this tutorial, it shows the integration between “Struts2 + Spring + Hibernate“. Make sure you check the following tutorials before c转载 2013-05-14 22:05:12 · 1902 阅读 · 0 评论 -
Binding & Remote Lookup of Custom Objects in JNDI tree of JBoss AS7.1.1
In this example we will see how to bind custom objects in the JNDI tree of “JBoss AS7.1.1 Final” and What kind of JNDI name we should choose in order to make the Remote client to be able to access (lo转载 2013-04-15 15:01:45 · 1341 阅读 · 0 评论 -
SpringMVC中使用Interceptor拦截器
SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理。比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那样子判断当前时间是否是购票时间。 一、定义Interceptor实现类 SpringMVC 中的Interceptor 拦截请求是通过HandlerInterceptor 来转载 2014-02-11 18:35:55 · 965 阅读 · 0 评论 -
maven3 常用命令
Maven库: http://repo2.maven.org/maven2/Maven依赖查询: http://mvnrepository.com/Maven常用命令: 1. 创建Maven的普通java项目: mvn archetype:create -DgroupId=packageName -DartifactId=proje转载 2014-02-16 10:34:41 · 888 阅读 · 0 评论 -
HQApi命令行接口配置
运行命令行之前的准备首先在你的个人目录下创建 配置文件client.properties 如下cd C:\Users\scnyli\mkdir ".hq"创建一个 client.properties 文件,内容如下:host=localhostport=7443secure=trueuser=hqadminpassword=hqadmin原创 2014-09-17 10:47:46 · 1637 阅读 · 0 评论 -
Java 正则表达式的使用指南
本文属于技术文章,国外网站Copy过来参考使用,不再具体翻译了,相信程序都能有这些英语阅读能力。1. 概述In this article, we will discuss the Java Regex API and how regular expressions can be used in Java programming language.In the world of regu...翻译 2019-06-06 16:35:19 · 742 阅读 · 0 评论 -
【Maven】添加本地库到Maven项目中只有这三种方法
引语你是否遇到跟我一样需要添加自己的开发库到maven项目中,这些库要么没有被Maven中央库所管理,或本身不想被公开的内部库. 那么你只有三种方法,如果这三种方法不灵,就没辙了,你也不用再花时间去别的的去找了:1- 手工安装你的本地库到Maven的本地存储仓库。The first solution is to add manually the JAR into your local ...翻译 2019-04-16 16:26:36 · 1928 阅读 · 0 评论 -
SpringMVC中两种validation方法详解
不同于Struts1.x的基于Form的验证机制,Spring 基于注释的校验机制:1)支持JSR303 Bean Validation定义的校验规范。2) 支持Spring框架定义的Validator接口定义的校验。校验方式一: JSR303 Bean ValidationSpring3.1后增加的了对JSR303 Bean Validation规范的支持,不仅可以对Spri...原创 2018-07-18 16:12:43 · 20579 阅读 · 0 评论 -
Apache Tomcat 8.5的新特点
Tomcat 8.5.x 分支来自于 Tomcat 9.0.0 M4 版本。其主要的目的是为了恢复的 Java 7 的兼容性,同时支持 Servlet 3.1, JSP 2.3, EL 3.0, WebSocket 1.1 和 JASPIC 1.1 规范。Tomcat 8.0.x 分支虽然说支持 JDK8 ,但是支持非常有限,面对其他竞争者对 JDK8 新特性的完全支持,Tomcat 8 明显落后很多,Tomcat 8.5.x 应该是补课版本。让目前 Tomcat 的主流版本能够跟上来。原创 2017-04-13 17:33:44 · 7132 阅读 · 0 评论 -
Java进程奔溃故障排查
本文对系统奔溃原因提供了一些特定场景下数据分析信息和排查指南A crash, or fatal error, causes a process to terminate abnormally. There are various possible reasons for a crash. For example, a crash can occur due to a bug in the Ho翻译 2016-11-14 15:25:33 · 9054 阅读 · 0 评论 -
Java Properties 文件书写规范
Java 程序支持国际化和本地化的发布,通常我们通过书写 Java Properties 文件来实现,原则上,书写都很随意,但其实还是有一些规则在里面,只是平时没太在意,特总结一下。原创 2016-11-16 14:27:22 · 7474 阅读 · 0 评论 -
Java 线程栈数据收集
最近做技术支持碰到一个问题,tc server 启动快速死掉了,不知道什么出错,日志都很干净,看不出来什么异常,于是自己想写一个程序来分析当时的线程栈,写了个shell来抓:重点讲一下我的思路: 1> 用jps抓运行的Java进程。 jps是jdk提供的一个查看当前Java进程的小工具, 可以看做是JavaVirtual Machine Process Status Tool的缩写。使用官方说明原创 2016-11-03 13:53:22 · 1277 阅读 · 0 评论 -
Java 8 加密架构中Oracle提供者总结
Java 8 加密架构中Oracle提供者总结本文覆盖的加密课题主要涵盖:IntroductionImport Limits on Cryptographic AlgorithmsCipher TransformationsSecureRandom ImplementationsThe SunPKCS11 ProviderThe SUN ProviderThe SunRsaSi翻译 2016-07-01 14:58:41 · 3030 阅读 · 1 评论 -
详解 Spring 3.0 基于 Annotation 的依赖注入实现
详解 Spring 3.0 基于 Annotation 的依赖注入实现Spring 的依赖配置方式与 Spring 框架的内核自身是松耦合设计的。然而,直到 Spring 3.0 以前,使用 XML 进行依赖配置几乎是唯一的选择。Spring 3.0 的出现改变了这一状况,它提供了一系列的针对依赖注入的注解,这使得 Spring IoC 在 XML 文件之外多了一种可行的选择。本文将详转载 2015-03-05 16:46:09 · 1031 阅读 · 0 评论 -
Tomcat 支持的Java 版本和兼容性总结
最新最全的Tomcat 支持的Java版本对照,即兼容性一览表:Servlet SpecJSP SpecEL SpecWebSocket SpecApache Tomcat versionActual release revisionSupport Java Versions4.0TBD (2.4?)TBD (3.1?)TBD (1.原创 2014-12-28 16:07:20 · 13025 阅读 · 0 评论 -
使用 Spring Boot 快速构建 Spring 框架应用
Spring 框架作为目前非常流行的一个 Java 应用开发框架,它所包含的内容是非常繁多的。Spring 框架包含几十个不同的子项目,涵盖应用开发的不同方面。要在这些子项目之间进行选择,并快速搭建一个可以运行的应用是比较困难的事情。Spring Boot 的目的在于快速创建可以独立运行的 Spring 应用。通过 Spring Boot 可以根据相应的模板快速创建应用并运行。Spring Boo转载 2015-02-02 15:49:40 · 1767 阅读 · 0 评论 -
Changing hostname/IP for Weblogic 11g
Changing hostname/IP for Weblogic 11g Recently I had to migrate two VMs hosting SOA/WebCenter 11g respectively from our US centers to India centers. This involved change in the hostname/IP of th转载 2011-12-30 11:13:37 · 2533 阅读 · 0 评论 -
强制SSL(HTTPS) Servlet Filter
Servlert规范中已经有自动跳转到保护页面(Http - Https)的方法了:web.xml Test Auth Protected Area /* DELETE GET POST PUT SSL required CONFIDENTIAL Bas转载 2014-11-13 15:06:16 · 3426 阅读 · 0 评论 -
javax.servlet.jsp.jstl.core.Config 使用代码案例
下面的代码案例来源开源项目,你可以参考使用. 如果觉得好,请点个赞,鼓励一下。Code Example 1: 5 From project alphaportal_dev, under directory/sys-src/alphaportal/web/src/main/java/alpha/portal/webapp/filter/.Source Local翻译 2014-11-13 15:03:07 · 2241 阅读 · 0 评论 -
JBoss 7.1 - Datasource Configuration and App Deployment
JBoss 7.1.1.Final has been released in 3月份 2012. Lets take a look at its directories, how to deploy and how to configure data source.1. Directory Layout: JBoss 7 is fundamentally different previou转载 2013-03-26 09:18:30 · 1321 阅读 · 0 评论 -
Java, ProGuard, and Ant - How to obfuscate Java class files with ProGuard
Java obfuscator/obfuscation FAQ: How can I obfuscate my Java class files so they can't easily be decompiled? (Or, how do I use ProGuard to obfuscate my Java class files?)As I've written before in转载 2013-04-08 17:23:44 · 1627 阅读 · 0 评论 -
How to Install JDK 1.6 on a Solaris
Solaris is a Unix-based operating system designed and marketed by Sun Microsystems. Solaris can be used as a complete software production system, with Java being included. To write Java programs on a原创 2012-07-05 17:29:29 · 1010 阅读 · 2 评论 -
CodeCollaborator Eclipse Plug-in
Eclipse Plug-in Download & Update SiteWarning: by default a new installation of CodeCollaborator Server version 5.0 and above does not allow 4.0 clients to connect.If your server is version 5.x yo转载 2012-07-06 15:37:59 · 1209 阅读 · 0 评论 -
ClassLoader Class - Class Loaders
This document provides tutorial notes and example codes on java.lang.ClassLoader class. Topics include JRE class loaders: Bootstrap, Extensions and System Class Loaders; using getSystemClassLoader().l转载 2012-06-25 16:15:08 · 718 阅读 · 0 评论 -
Cobertura Plugin configuration for hudson.
Detail info please check the plugin website is http://wiki.hudson-ci.org/display/HUDSON/Cobertura+PluginThe following is telling you how to configure it step by step.Configuring the Cobertura原创 2012-05-23 18:40:02 · 1306 阅读 · 0 评论