# we-datasource **Repository Path**: happygroup_1/we-datasource ## Basic Information - **Project Name**: we-datasource - **Description**: 通用数据源连接程序,用springboot实现。将数据库以只读的形式吧数据暴露出来。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-18 - **Last Updated**: 2024-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # we-datasource #### 介绍 通用数据源连接程序,用springboot实现。将数据库以只读的形式吧数据暴露出来。 #### 软件架构 软件架构说明 #### 使用说明 1. 使用SQL从hotForge数据源查询数据 ``` POST http://127.0.0.1:7788/freeQuerySql Content-Type: application/json { "sql":"select * from dash.hot_wind_forge limit 30", "dataSource":"hotForge" } ``` 2. 创建一个名为hotForge的数据源 ``` POST http://127.0.0.1:7788/createDataSource Content-Type: application/json { "name":"hotForge", "props": { "driverClassName": "org.postgresql.Driver", "jdbcUrl": "jdbc:postgresql://10.2.1.181:5432/postgres?useUnicode=true&characterEncoding=utf8", "username": "gpadmin", "password": "gpadmin" } } ``` 3. 删除一个名为hotForge的数据源 ``` POST http://127.0.0.1:7788/removeDataSource Content-Type: application/json { "name":"hotForge" } ```