All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.starmcc.qmframework.config.AesConfiguration Maven / Gradle / Ivy

Go to download

springboot based on a series of packaging framework. QmFramework to implements AOP, rewrite the requestBody, global exception catching,version checking, request body parameter symmetric encryption mechanism, controller packaging and the toolkit collection. thank you for using it.

There is a newer version: 3.0.1-RELEASE
Show newest version
package com.starmcc.qmframework.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * AES配置
 *
 * @Author: qm
 * @Date: 2019/8/29 17:52
 */
@ConfigurationProperties(prefix = "qmframework.aes", ignoreUnknownFields = false)
public class AesConfiguration {

    public static boolean start;
    public static String key;
    public static String encoding;
    public static int number;

    @Value("${start:false}")
    public void setStart(boolean start) {
        AesConfiguration.start = start;
    }

    @Value("${key:ohiah2019sDShdieub51h8910s}")
    public void setKey(String key) {
        AesConfiguration.key = key;
    }

    @Value("${encoding:UTF-8}")
    public void setEncoding(String encoding) {
        AesConfiguration.encoding = encoding;
    }

    @Value("${number:1}")
    public void setNumber(int number) {
        AesConfiguration.number = number;
    }

    public boolean isStart() {
        return AesConfiguration.start;
    }

    public String getKey() {
        return AesConfiguration.key;
    }

    public String getEncoding() {
        return AesConfiguration.encoding;
    }

    public int getNumber() {
        return AesConfiguration.number;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy