package cn.enjoy.config;spring
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;this
@ConfigurationProperties(prefix = "spring.datasource.spring")
@Component
public class DBConfig1 {
private String driverClassName;
private String jdbcUrl;
private String username;
private String password;.net
public String getDriverClassName() {
return driverClassName;
}get
public void setDriverClassName(String driverClassName) {
this.driverClassName = driverClassName;
}io
public String getJdbcUrl() {
return jdbcUrl;
}class
public void setJdbcUrl(String jdbcUrl) {
this.jdbcUrl = jdbcUrl;
}import
public String getUsername() {
return username;
}jdbc
public void setUsername(String username) {
this.username = username;
}im
public String getPassword() {
return password;
}db
public void setPassword(String password) { this.password = password; } }