update 优化 !pr94 代码结构

2.X
疯狂的狮子Li 2 years ago
parent 3269abbcad
commit ca620ec058

@ -492,13 +492,13 @@ services:
- /docker/grafana/grafana.ini:/etc/grafana/grafana.ini
- /docker/grafana:/var/lib/grafana
network_mode: "host"
shardingproxy:
image: apache/shardingsphere-proxy
image: apache/shardingsphere-proxy:5.3.2
container_name: shardingsphere-proxy
restart: always
command: server /data
ports:
- 13307:3307
- "3307:3307"
volumes:
- /docker/shardingproxy/conf:/opt/shardingsphere-proxy/conf
- /docker/shardingproxy/ext-lib:/opt/shardingsphere-proxy/ext-lib

@ -1,6 +1,5 @@
package org.dromara.demo.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.RequiredArgsConstructor;
@ -11,8 +10,9 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 使 https://blog.csdn.net/zhaozhiqiang1981/article/details/129935075
*/
@RequiredArgsConstructor
@RestController
@RequestMapping("/sharding")

@ -48,7 +48,8 @@ spring:
password: ${datasource.system-master.password}
sharding:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://192.168.0.60:3307/data-center_db?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
# shardingproxy 服务的ip地址
url: jdbc:mysql://127.0.0.1:3307/data-center_db?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
username: root
password: root
# oracle:

Loading…
Cancel
Save