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

com.github.jun1st.datasource.MSDataSourceProperties Maven / Gradle / Ivy

package com.github.jun1st.datasource;

import com.github.jun1st.datasource.spring.boot.autoconfigure.hikari.MSHikariConfig;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;

import java.util.HashMap;
import java.util.Map;

/**
 * @author fengde
 */
@Data
@ConfigurationProperties(prefix = "spring.datasource.master-slave")
public class MSDataSourceProperties {

    private String primary = "master";

    @NestedConfigurationProperty
    private MSHikariConfig hikari = new MSHikariConfig();

    @NestedConfigurationProperty
    private DataSourceProperty master = new DataSourceProperty();

    @NestedConfigurationProperty
    private Map slave = new HashMap<>();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy