Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
773b0433
Commit
773b0433
authored
Feb 03, 2021
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改sentinel限流配置
parent
d1f3e7bf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
63 deletions
+8
-63
SentinelConfig.java
...ateway/src/main/java/com/jz/dm/config/SentinelConfig.java
+2
-4
ApiSyncingDatasourceMapper.java
...ain/java/com/jz/dm/mapper/ApiSyncingDatasourceMapper.java
+0
-12
ApiSyncingDatasourceTypeMapper.java
...java/com/jz/dm/mapper/ApiSyncingDatasourceTypeMapper.java
+0
-13
ProducerServiceImpl.java
...main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
+0
-4
application.yml
jz-dm-apigateway/src/main/resources/application.yml
+6
-6
ApiSyncingDatasourceMapper.xml
.../src/main/resources/mapper/ApiSyncingDatasourceMapper.xml
+0
-11
ApiSyncingDatasourceTypeMapper.xml
.../main/resources/mapper/ApiSyncingDatasourceTypeMapper.xml
+0
-13
No files found.
jz-dm-apigateway/src/main/java/com/jz/dm/config/SentinelConfig.java
View file @
773b0433
...
@@ -8,9 +8,7 @@ import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
...
@@ -8,9 +8,7 @@ import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import
com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager
;
import
com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
javax.annotation.PostConstruct
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
...
@@ -23,7 +21,7 @@ import java.util.List;
...
@@ -23,7 +21,7 @@ import java.util.List;
* @DAY_NAME_SHORT: 周四
* @DAY_NAME_SHORT: 周四
* @Description: 限流熔断初始化配置
* @Description: 限流熔断初始化配置
**/
**/
@Configuration
//
@Configuration
public
class
SentinelConfig
{
public
class
SentinelConfig
{
@Bean
@Bean
public
SentinelResourceAspect
sentinelResourceAspect
()
{
public
SentinelResourceAspect
sentinelResourceAspect
()
{
...
@@ -41,7 +39,7 @@ public class SentinelConfig {
...
@@ -41,7 +39,7 @@ public class SentinelConfig {
@Value
(
"${sentinel.resource}"
)
@Value
(
"${sentinel.resource}"
)
private
String
limitSource
;
private
String
limitSource
;
@PostConstruct
//
@PostConstruct
private
void
initFlowRules
()
{
private
void
initFlowRules
()
{
List
<
FlowRule
>
rules
=
new
ArrayList
<>();
List
<
FlowRule
>
rules
=
new
ArrayList
<>();
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/mapper/ApiSyncingDatasourceMapper.java
deleted
100644 → 0
View file @
d1f3e7bf
package
com
.
jz
.
dm
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.jz.dm.models.domian.ApiSyncingDatasource
;
/**api数据源配置信息表 mapper
* @author ybz
*
*/
public
interface
ApiSyncingDatasourceMapper
extends
BaseMapper
<
ApiSyncingDatasource
>
{
}
jz-dm-apigateway/src/main/java/com/jz/dm/mapper/ApiSyncingDatasourceTypeMapper.java
deleted
100644 → 0
View file @
d1f3e7bf
package
com
.
jz
.
dm
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.jz.dm.models.domian.ApiSyncingDatasourceType
;
/**api数据源类型信息表 mapper
* @author ybz
*
*/
public
interface
ApiSyncingDatasourceTypeMapper
extends
BaseMapper
<
ApiSyncingDatasourceType
>
{
}
jz-dm-apigateway/src/main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
View file @
773b0433
...
@@ -58,12 +58,8 @@ public class ProducerServiceImpl implements ProducerService {
...
@@ -58,12 +58,8 @@ public class ProducerServiceImpl implements ProducerService {
@Resource
@Resource
private
ApiInterfaceMapper
apiInterfaceMapper
;
private
ApiInterfaceMapper
apiInterfaceMapper
;
@Resource
@Resource
private
ApiSyncingDatasourceMapper
apiSyncingDatasourceMapper
;
@Resource
private
ApiOpenApiEsFieldsMapper
apiOpenApiEsFieldsMapper
;
private
ApiOpenApiEsFieldsMapper
apiOpenApiEsFieldsMapper
;
@Resource
@Resource
private
ApiOpenApiEsTagconfigMapper
apiOpenApiEsTagconfigMapper
;
@Resource
private
ApiInterfaceCustomMapper
apiInterfaceCustomMapper
;
private
ApiInterfaceCustomMapper
apiInterfaceCustomMapper
;
@Resource
@Resource
private
ApiInterfaceFileMapper
apiInterfaceFileMapper
;
private
ApiInterfaceFileMapper
apiInterfaceFileMapper
;
...
...
jz-dm-apigateway/src/main/resources/application.yml
View file @
773b0433
...
@@ -25,18 +25,18 @@ spring:
...
@@ -25,18 +25,18 @@ spring:
transport
:
transport
:
# sentinel-dashboard服务地址 # sentinel-dashboard-1.6.0 的访问路径 ,
# sentinel-dashboard服务地址 # sentinel-dashboard-1.6.0 的访问路径 ,
#启动方式java -jar sentinel-dashboard-1.6.0.jar --server.port=9090
#启动方式java -jar sentinel-dashboard-1.6.0.jar --server.port=9090
dashboard
:
localhost
:8080
dashboard
:
127.0.0.1
:8080
heartbeat-interval-ms
:
500
heartbeat-interval-ms
:
500
# 项目本地会启动一个服务的端口号,默认8719,用于与sentinel-dashboard通讯
# 项目本地会启动一个服务的端口号,默认8719,用于与sentinel-dashboard通讯
port
:
8719
port
:
8719
#服务器ip
#服务器ip
clientIp
:
192.168.1.114
#
clientIp: 192.168.1.114
filter
:
#
filter:
# 需要进行限流监控的接口,多个匹配用逗号隔开
# 需要进行限流监控的接口,多个匹配用逗号隔开
url-patterns
:
/*
#
url-patterns: /*
servlet
:
#
servlet:
# 触发限流后重定向的页面
# 触发限流后重定向的页面
block-page
:
/sentinel/block
#
block-page: /sentinel/block
#取消Sentinel控制台懒加载
#取消Sentinel控制台懒加载
eager
:
true
eager
:
true
...
...
jz-dm-apigateway/src/main/resources/mapper/ApiSyncingDatasourceMapper.xml
deleted
100644 → 0
View file @
d1f3e7bf
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dm.mapper.ApiSyncingDatasourceMapper"
>
<sql
id=
"Base_Column_List"
>
id, datasource_type, datasource_name, datasource_desc, project_id,
jdbc_url, db_name, user_name, password, endpoint,
bucket, access_id, access_key, protocol, host,
port, default_fs, table_schema, data_status, remark,
create_date, create_user, update_date, update_user, is_deleted
</sql>
</mapper>
jz-dm-apigateway/src/main/resources/mapper/ApiSyncingDatasourceTypeMapper.xml
deleted
100644 → 0
View file @
d1f3e7bf
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.jz.dm.mapper.ApiSyncingDatasourceTypeMapper"
>
<sql
id=
"Base_Column_List"
>
id, datasource, datasource_catecode, datasource_catename, datasource_type,
img_url, data_status, is_enabled, datasource_catetype, driver_class_name,
is_enable_test, default_source_script, default_target_script, is_enable_source, is_enable_target,
remark, create_date, create_user, update_date, update_user,
is_deleted
</sql>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment