Tags
Athena Framework
Archives
-
Recent Posts
-
Tag Archives: Java
Java Code Quality Control Eclipse Plugins 代码质量控制Eclipse插件
Several Eclipse plugins which can help to improve code quality. all plugs can find from Eclipse Market. 1. FindBugs Find potential bugs for you. “a program which uses static analysis to look for bugs in Java code” 2. eCobertura “eCobertura …
Using Oracle Auto-Increment/Sequence in Hibernate/MyBatis
(Hibernate) Error 1 : java.sql.SQLSyntaxErrorException: ORA-02289: sequence does not exist Solution: Specify the sequence: package com.liguoliang.jee.vo; /** * Represents Client. * @author Guoliang * */ @Entity @Table (name=”Client”) public class Client { @Id @Column(name=”id”) @SequenceGenerator(name=”my_seq”, sequenceName=”CLIENT_ID_SEQUENCE”) @GeneratedValue(strategy = GenerationType.SEQUENCE ,generator=”my_seq”) …
Oracle 11 XE & JDBC
How to get Oracle 11 XE for Windows 64? Download the Oracle 11 XE 32 bit and install it. No problem for me ( Win7 64) Forgot the sys password, how to reset? Conn / as sysdba passw system input …
Update Log4j Appender at runtime
import java.io.IOException; import org.apache.log4j.FileAppender; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; /** * Test for adding appender to log4j at runtime. * @author SGSCLGLD * */ public class LogingTest { static Logger log = Logger.getLogger(LogingTest.class); public static void main(String[] args) throws IOException { …
Java RSA Key Generation/Encryption/Decryption RSA秘钥生成/加密/解密
Requirement: Generate RSA key pair using Java, and test encryption/decryption. Source code: package com.rsa; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import javax.crypto.Cipher; public class RSATest { /** * Generate key pair and encrypt/decrypt message. * @param args * …


