java
文章平均质量分 59
安小平
诚实勤劳,认真细心有耐性,学习能力强
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
File upload issue:The method createBlob(InputStream) is undefined for the type Hibernate
System.out.println("Name:" + data); System.out.println("Desc:" + data.getEmployeeDescription()); Session currentSession = getSessionFactory().getCurrentSession(); Blob blob = Hibernate.getLobCreator(currentSession).createBlob(new byte[0]); .转载 2020-07-23 20:03:33 · 330 阅读 · 0 评论 -
java.lang.SecurityException: JCE cannot authenticate the provider BC
在开发java使用RSA加密是遇到这个问题, Exception in thread "main" java.lang.SecurityException: JCE cannot authenticate the provider BC at javax.crypto.Cipher.getInstance(Cipher.java:657) at com.suntien.hr.co...原创 2020-02-28 11:48:46 · 7154 阅读 · 1 评论 -
普通Java类获取Spring的ApplicationContext
在SSH集成的前提下。某些情况我们需要在Action以外的类中来获得SPRing所管理的Service对象。 之前我在网上找了好几好久都没有找到合适的方法。例如: ApplicationContext context = new ClassPathXmlApplicationContext(); 当时我觉得没有这个必要,浪费内存。后来我终于想出了一个解决方法。在此拿来给大家参转载 2015-09-06 16:50:12 · 380 阅读 · 0 评论 -
一行代码实现java list去重
1.不带类型写法: List listWithoutDup = new ArrayList(new HashSet(listWithDup)); 2.带类型写法(以String类型为例): 1)Java 7以下写法: List listWithoutDup = new ArrayList(new HashSet(listWithDup)); 2)Java 7及以上写法: List li转载 2016-05-05 09:10:02 · 378 阅读 · 0 评论
分享