带驼峰属性转为SQL带下划线并大写

package com.hongniu.common.quartz.factory;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @program: hongniu_serverManage
 * @description: 带驼峰属性转为SQL带下划线并大写
 * @author: qlinchao
 * @create: 2019-02-18 14:57
 **/
public class Test {
    static Pattern p = Pattern.compile("[A-Z]");
    public static void main(String[] args) {
        String[] strArr = {"SubAccount","SubAccName","Order", "TransCode","OtherSubAccount","OtherSubAccName",
                "CreMoney","PayPayeeSign","SubAccountMoney", "MerchantSqlId","SysSqlId","TradeTimes",
                "PayOrderid","CurrCode","FeeAmt", "PayBankNo","TranDate","FreezeAccbal",

                "BusiSummary","CustPayFee","MerchantFee","AppType", "FeeFlag","Remark1","Remark2", "TransCodeId","Remark3","Remark4","Remark5"
        };
        for (int i = 0; i 

参考:https://blog.csdn.net/m0_37749778/article/details/82148874

你可能感兴趣的:(工具)