AJ_Report(3)

这是一个关于GAEA业务配置的Java源码分析,包括了ApplicationInitRunner的系统启动执行,ReportCacheHelper的缓存配置,以及EhCache的相关设置,用于提升应用的性能和初始化流程。
摘要由CSDN通过智能技术生成

2021SC@SDUSC
源码地址:…\AJ_report\report-master\report-core\src\main\java\com\anjiplus\template\gaea\business\config\BusinessAutoConfiguration.java
源码内容:

package com.anjiplus.template.gaea.business.config;

import com.anji.plus.gaea.cache.CacheHelper;
import com.anjiplus.template.gaea.business.cache.ReportCacheHelper;
import com.anjiplus.template.gaea.business.runner.ApplicationInitRunner;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.cache.ehcache.EhCacheCache;
import org.springframework.cache.ehcache.EhCacheCacheManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * business配置类
 * @author lr
 * @since 2021-04-08
 */
@Configuration
@MapperScan(basePackages = {
        "com.anjiplus.template.gaea.business.modules.*.dao",
        "com.anjiplus.template.gaea.business.modules.*.**.dao"
})
public class BusinessAutoConfiguration {

    /**
     * 系统启动完执行
     * @return
     */
    @Bean
    public ApplicationInitRunner applicationInitRunner() {
        return new ApplicationInitRunner();
    }

    @Bean
    public CacheHelper gaeaCacheHelper(){
        return new ReportCacheHelper();
    }

    @Bean
    public EhCacheCache ehCacheCache() {
        return (EhCacheCache) ehCacheCacheManager().getCache("reportCache");
    }

    /**
     * 创建ehCacheCacheManager
     */
    @Bean
    public EhCacheCacheManager ehCacheCacheManager() {

        return new EhCacheCacheManager();
    }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值