package cn.config;

import com.alibaba.nacos.api.config.annotation.NacosValue;
import com.alibaba.nacos.spring.context.annotation.config.NacosPropertySource;
import lombok.Data;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@NacosPropertySource(dataId = "mysql", autoRefreshed = true)
public class MysqlNacosConf {

    @NacosValue("${spring.datasource.driver-class-name}")
    private String driverClassName;
    @NacosValue("${spring.datasource.url}")
    private String url;
    @NacosValue("${spring.datasource.username}")
    private String username;
    @NacosValue("${spring.datasource.password}")
    private String password;

}
