修改注释

master
星期八 5 years ago
parent 85f98a6734
commit 2c206f7859
  1. 4
      panda-code/src/main/java/org/panda/code/uitl/RSAUtils.java
  2. 3
      panda-jdbc/src/main/java/org/panda/jdbc/BeanHander.java
  3. 3
      panda-jdbc/src/main/java/org/panda/jdbc/JdbcLoad.java
  4. 8
      panda-jdbc/src/main/java/org/panda/jdbc/JdbcUtils.java
  5. 15
      pom.xml

@ -31,7 +31,7 @@ public class RSAUtils {
/**
* 默认字符集编码 utf-8
*/
public static final String DEFALUT_CHART="utf-8";
public static final String DEFAULT_CHART="utf-8";
/**
@ -82,7 +82,7 @@ public class RSAUtils {
RSAPublicKey pubKey = (RSAPublicKey) KeyFactory.getInstance(ALGORITHM_RSA).generatePublic(new X509EncodedKeySpec(decoded));
Cipher cipher = Cipher.getInstance(ALGORITHM_RSA);
cipher.init(Cipher.ENCRYPT_MODE,pubKey);
String outStr = Base64.getEncoder().encodeToString(cipher.doFinal(str.getBytes(DEFALUT_CHART)));
String outStr = Base64.getEncoder().encodeToString(cipher.doFinal(str.getBytes(DEFAULT_CHART)));
return outStr;
}

@ -25,11 +25,8 @@ public class BeanHander implements ResultSetHandler {
@Override
public Object handler(ResultSet rs) {
try {
Object bean = BeanUtil.instantiateClass(clazz);
List<Field> fieldList = BeanUtil.getAllField(clazz);
for (Field f:fieldList){
String fieldName = f.getName();
String columnName = BeanSqlUtil.caseToHump(fieldName);

@ -31,6 +31,9 @@ public class JdbcLoad {
loadDriver();
}
/**
* 加载驱动类
*/
private void loadDriver(){
try {
Class.forName(this.driver);

@ -1,5 +1,6 @@
package org.panda.jdbc;
import com.sun.xml.internal.bind.v2.TODO;
import org.panda.code.uitl.PropsUtil;
import org.panda.code.uitl.StringUtil;
import org.panda.jdbc.helper.DbConfigInterface;
@ -21,7 +22,9 @@ public class JdbcUtils {
* 线程安全
*/
private static final ThreadLocal<Connection> CONNECTION_HOLDER = new ThreadLocal<>();
/**
* 数据源
*/
private DataSource dataSource;
public JdbcUtils(DataSource dataSource){
@ -143,7 +146,6 @@ public class JdbcUtils {
/**
* 创建表
*
* @param sql
*/
public void createTable(String sql) {
@ -169,7 +171,6 @@ public class JdbcUtils {
/**
* 查询
*
* @param sql
* @param params
* @param rsh
@ -201,7 +202,6 @@ public class JdbcUtils {
* @param st
* @param rs
*/
public void release(Connection conn, Statement st, ResultSet rs) {
if (rs != null) {
try {

@ -70,20 +70,7 @@
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>

Loading…
Cancel
Save