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

com.github.xiaoyuge5201.config.MyDataSourceProperties Maven / Gradle / Ivy

Go to download

数据库连接工具,查询mysql、oracle、sqlserver、postgresql的数据表以及字段信息;同时支持导出数据库设计文档

The newest version!
package com.github.xiaoyuge5201.config;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 数据库连接信息, 下面的是Mysql的样例配置
 * spring:
 *     datasource:
 *         type: com.alibaba.druid.pool.DruidDataSource
 *         url: jdbc:mysql://localhost:3306/dbname
 *         username: root
 *         password: 123456
 *         driver-class-name: com.mysql.jdbc.Driver
 *         database: dbname    #数据库名称
 * @author xiaoyuge
 */
@ConfigurationProperties(prefix = "spring.datasource")
public class MyDataSourceProperties {
    /**
     * required
     * 数据库类型:对应:spring.datasource.type
     */
    private String type;
    /**
     * 数据库驱动名称,对应:spring.datasource.driver-class-name
     */
    private String driverClassName;
    /**
     * required
     * 数据库URL, 对应:spring.datasource.url
     */
    private String url;
    /**
     * required
     * 用户名,对应:spring.datasource.username
     */
    private String username;
    /**
     * required
     * 数据库密码,对应:spring.datasource.password
     */
    private String password;
    /**
     * required,用于获取数据库名称
     * 对应:spring.datasource.database
     */
    private String database;
    /**
     * 達夢數據庫
     */
    private String owner;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy