RuoYi
2020-07-19 cee572f237cb293e4a9070ef458356bc6daa2105
ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java
ÎļþÃû´Ó ruoyi/src/main/java/com/ruoyi/framework/config/GenConfig.java ÐÞ¸Ä
@@ -1,6 +1,8 @@
package com.ruoyi.framework.config;
package com.ruoyi.generator.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
@@ -10,6 +12,7 @@
 */
@Component
@ConfigurationProperties(prefix = "gen")
@PropertySource(value = { "classpath:generator.yml" })
public class GenConfig
{
    /** ä½œè€… */
@@ -18,7 +21,7 @@
    /** ç”ŸæˆåŒ…路径 */
    public static String packageName;
    /** è‡ªåŠ¨åŽ»é™¤è¡¨å‰ç¼€ï¼Œé»˜è®¤æ˜¯true */
    /** è‡ªåŠ¨åŽ»é™¤è¡¨å‰ç¼€ï¼Œé»˜è®¤æ˜¯false */
    public static boolean autoRemovePre;
    /** è¡¨å‰ç¼€(类名不会包含表前缀) */
@@ -29,6 +32,7 @@
        return author;
    }
    @Value("${author}")
    public void setAuthor(String author)
    {
        GenConfig.author = author;
@@ -39,6 +43,7 @@
        return packageName;
    }
    @Value("${packageName}")
    public void setPackageName(String packageName)
    {
        GenConfig.packageName = packageName;
@@ -49,6 +54,7 @@
        return autoRemovePre;
    }
    @Value("${autoRemovePre}")
    public void setAutoRemovePre(boolean autoRemovePre)
    {
        GenConfig.autoRemovePre = autoRemovePre;
@@ -59,6 +65,7 @@
        return tablePrefix;
    }
    @Value("${tablePrefix}")
    public void setTablePrefix(String tablePrefix)
    {
        GenConfig.tablePrefix = tablePrefix;