![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java
文章平均质量分 52
weaponofpower
Java
展开
-
Hibernate JPA MetaModel 生成
在已安裝maven的情況下,使用ant來生成JPA Entity的Meta Model 1. 在ant安裝插件, 將maven-ant-tasks-2.1.3.jar放入ant的lib中 2.build.xml 3.執行ant原创 2013-01-19 00:47:06 · 1191 阅读 · 0 评论 -
用Apache Commons Compress 產生tar.gz
POM: commons-io commons-io 2.4 org.apache.commons commons-compress 1.5 代碼 import java.io.File; import java.io.FileOutputStream; import org.apache.commons.compress.archive原创 2013-04-02 21:28:19 · 2505 阅读 · 0 评论 -
Kryo 怎麼用
Kryo 經過比較, 比JDK自帶的序列化(Serializable AND Externalizable)要快得多,並且最後得到的Byte Array也要小很多。 但是比較悲劇的是 Threading Kryo is not thread safe. Each thread should have its own Kryo instance. 難道每次使用都要去new 一個?原创 2013-04-24 23:10:00 · 1260 阅读 · 0 评论 -
Spring Cache 使用的注意點
在一個Service裡面的方法 @Transactional(readOnly = true) @Cacheable(value = "users", key = "#id") public User findUser(Integer id) { return this.em.find(User.class, id); } 有時會發現 緩存是緩存了,但是為啥還有事務的打開和關閉原创 2013-04-24 23:21:23 · 875 阅读 · 0 评论 -
Spring JPA 配置
beans <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://原创 2013-04-03 23:52:46 · 1483 阅读 · 0 评论 -
如果archiva提示admin被鎖定怎麼辦?
apchae archiva 1.3.5的用戶資料庫使用的是derby, 用SquirreLSQL 打開 位於/apache-archiva-1.3.5/data/databases下的users數據庫,然後 update jdouser set locked='N',COUNT_FAILED_LOGIN_ATTEMPTS=0 where username='admin' 重啓archiva原创 2013-05-25 00:01:43 · 1470 阅读 · 0 评论