idea 安裝mybatis plugin (mybatis插件)


注意:可以用免費版本的,就是下面沒有 被紅框圈中的 Free Mybatis Plugin

 

 

安裝上以后需要破解,先找到下面的文件

 

打開文件,設置其中的key 和 value :

 

這里面的key 和 value 哪兒來呢?

使用下面的代碼運行一下即可得到:

 

public class App 
{
    public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
        KeyPairGenerator keygen = KeyPairGenerator.getInstance("RSA");
        keygen.initialize(512);
        KeyPair kp = keygen.generateKeyPair();
        RSAPrivateKey privateKey = (RSAPrivateKey)kp.getPrivate();
        RSAPublicKey publicKey = (RSAPublicKey)kp.getPublic();
        System.out.println("KEY:\n" + bytesToHexString(publicKey.getEncoded()) + "\n");
        Cipher cipher = Cipher.getInstance("RSA");
        cipher.init(Cipher.ENCRYPT_MODE,privateKey);
        System.out.println("RESULT:\n" + bytesToHexString(cipher.doFinal("EamonSec".getBytes())) + "\n");
    }
    private static String bytesToHexString(byte[] src){
        StringBuilder stringBuilder = new StringBuilder("");
        if (src == null || src.length <= 0) {
            return null;
        }
        for (byte aSrc : src) {
            int v = aSrc & 0xFF;
            String hv = Integer.toHexString(v);
            if (hv.length() < 2) {
                stringBuilder.append(0);
            }
            stringBuilder.append(hv);
        }
        return stringBuilder.toString();
    }

}

 

經過幾天的使用,發現上面的插件用起來不是很爽,每次啟動idea都要重新生成一次注冊碼,后面發現有替代方法,使用免費版本的插件(free mybatis plugin)。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM