From 932793e138b8c1db6d774f9e383c369d8de9f7d3 Mon Sep 17 00:00:00 2001 From: smallchill Date: Tue, 29 Oct 2019 08:35:55 +0800 Subject: [PATCH] =?UTF-8?q?:tada:=20=E5=A2=9E=E5=8A=A0turbine=E9=9B=86?= =?UTF-8?q?=E7=BE=A4=E7=9B=91=E6=8E=A7=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- blade-ops/blade-turbine/pom.xml | 52 +++++++++++++++++++ .../trubine/TurbineApplication.java | 39 ++++++++++++++ .../src/main/resources/bootstrap.yml | 17 ++++++ blade-ops/pom.xml | 1 + pom.xml | 2 +- 5 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 blade-ops/blade-turbine/pom.xml create mode 100644 blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java create mode 100644 blade-ops/blade-turbine/src/main/resources/bootstrap.yml diff --git a/blade-ops/blade-turbine/pom.xml b/blade-ops/blade-turbine/pom.xml new file mode 100644 index 00000000..3c0d8658 --- /dev/null +++ b/blade-ops/blade-turbine/pom.xml @@ -0,0 +1,52 @@ + + + + blade-ops + org.springblade + 2.1.0.RELEASE + + 4.0.0 + + blade-turbine + + + + + org.springblade + blade-common + ${bladex.project.version} + + + org.springblade + blade-core-launch + ${bladex.tool.version} + + + org.springblade + blade-core-tool + ${bladex.tool.version} + + + org.springblade + blade-core-cloud + ${bladex.tool.version} + + + org.springblade + blade-core-secure + + + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix + + + org.springframework.cloud + spring-cloud-starter-netflix-hystrix-dashboard + + + + diff --git a/blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java b/blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java new file mode 100644 index 00000000..9040a590 --- /dev/null +++ b/blade-ops/blade-turbine/src/main/java/org/springblade/trubine/TurbineApplication.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * Neither the name of the dreamlu.net developer nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * Author: Chill 庄骞 (smallchill@163.com) + */ +package org.springblade.trubine; + +import org.springblade.core.launch.BladeApplication; +import org.springblade.core.launch.constant.AppConstant; +import org.springframework.cloud.client.SpringCloudApplication; +import org.springframework.cloud.netflix.hystrix.dashboard.EnableHystrixDashboard; +import org.springframework.cloud.netflix.turbine.EnableTurbine; + +/** + * Turbine启动器 + * + * @author Chill + */ +@EnableTurbine +@EnableHystrixDashboard +@SpringCloudApplication +public class TurbineApplication { + + public static void main(String[] args) { + BladeApplication.run(AppConstant.APPLICATION_TURBINE_NAME, TurbineApplication.class, args); + } + +} diff --git a/blade-ops/blade-turbine/src/main/resources/bootstrap.yml b/blade-ops/blade-turbine/src/main/resources/bootstrap.yml new file mode 100644 index 00000000..45386b8b --- /dev/null +++ b/blade-ops/blade-turbine/src/main/resources/bootstrap.yml @@ -0,0 +1,17 @@ +server: + port: 7003 + undertow: + # 设置IO线程数, 它主要执行非阻塞的任务,它们会负责多个连接, 默认设置每个CPU核心一个线程 + io-threads: 4 + # 阻塞任务线程池, 当执行类似servlet请求阻塞操作, undertow会从这个线程池中取得线程,它的值设置取决于系统的负载 + worker-threads: 20 + # 以下的配置会影响buffer,这些buffer会用于服务器连接的IO操作,有点类似netty的池化内存管理 + buffer-size: 1024 + # 是否分配的直接内存 + direct-buffers: true + +turbine: + app-config: blade-auth,blade-flow,blade-desk,blade-system,blade-user,blade-log + aggregator: + cluster-config: default + cluster-name-expression: new String("default") diff --git a/blade-ops/pom.xml b/blade-ops/pom.xml index 5ac6e55d..d3ebea67 100644 --- a/blade-ops/pom.xml +++ b/blade-ops/pom.xml @@ -21,6 +21,7 @@ blade-flow-design blade-log blade-resource + blade-turbine diff --git a/pom.xml b/pom.xml index 7f33cfc4..9b2d3d50 100644 --- a/pom.xml +++ b/pom.xml @@ -31,7 +31,7 @@ 2.1.0.RELEASE - 2.1.8.RELEASE + 2.1.9.RELEASE Greenwich.SR3 Cairo-SR8