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

templates.serviceConfig.ftl Maven / Gradle / Ivy

There is a newer version: 1.2.0
Show newest version
package ${cfg.packageConfig};

import com.github.yhl452493373.shiro.ShiroCaptcha;
<#if tableInfoList??>
    <#list tableInfoList as tempTableInfo>
import ${package.Service}.${tempTableInfo.serviceName};
    

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * 这个配置文件用于配置所有需要注入的bean,其余地方通过ServiceConfig.serviceConfig.xxxxService方式调用
 * 降低因同一个service在多个文件中分别注入引起的时间消耗
 */
@Configuration
public class ServiceConfig {
    public static ServiceConfig serviceConfig;

    @Autowired
    public ShiroCaptcha shiroCaptcha;
    <#if tableInfoList??>
    <#list tableInfoList as tempTableInfo>
    @Autowired
    public ${tempTableInfo.serviceName} ${tempTableInfo.serviceName?uncap_first};
    
    

    @PostConstruct
    public void init() {
        serviceConfig = this;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy