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

com.upuphub.profile.example.config.QuickProfileConfig Maven / Gradle / Ivy

Go to download

QuickProfileFramework for Java,基于Springboot自动注入配置,参考表驱动的思想,避免在庞大的查询修改中,需要繁琐冗杂的if else/switch case,可配置化的管理Profile信息。通过单一接口,实现要啥取啥。简单的配置管理复杂的Profile属性参数。

The newest version!
package com.upuphub.profile.example.config;

import com.upuphub.profile.annotation.ProfileServiceScan;
import com.upuphub.profile.component.ProfileParametersManager;
import com.upuphub.profile.reflect.ProfileMethodHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Leo Wang
 * @version 1.0
 * @date 2019/10/15 20:56
 */
@ProfileServiceScan(basePackages = "com.upuphub.profile.example.service")
@Configuration
public class QuickProfileConfig {

    @Bean
    public ProfileParametersManager buildProfileParametersManager(ProfileMethodHandler profileMethodHandler,
                                                                  @Value("${profiles.config.xmlPath}") String xmlPath){
        ProfileParametersManager profileParametersManager = new ProfileParametersManager(xmlPath);
        profileParametersManager.setProfileMethodHandler(profileMethodHandler);
        return profileParametersManager;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy