-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
499e187
commit e9dc699
Showing
24 changed files
with
249 additions
and
266 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,10 +32,10 @@ | |
* @review: zhangkewei[[email protected]]/2018年02月02日 14:24 | ||
*/ | ||
public class KafkaProduceConfig extends SourceConfig { | ||
@Setter @Getter private String servers; //服务器列表 | ||
@Setter @Getter private String group;//自动生成 | ||
@Setter @Getter private String topic;//主题 只能一个 | ||
@Setter @Getter private boolean transaction = true;//不输入 | ||
@Setter @Getter private String servers; //服务器列表 | ||
@Setter @Getter private String group; //自动生成 | ||
@Setter @Getter private String topic; //主题 只能一个 | ||
@Setter @Getter private boolean transaction = true; //不输入 | ||
@Setter @Getter private boolean oggJson = true; //是否格式化为ogg json格式 | ||
//分片字段名 | ||
//schema.表名->字段名1,字段名2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
156 changes: 65 additions & 91 deletions
156
...manager-boot/src/main/java/cn/vbill/middleware/porter/manager/ManagerBootApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,65 @@ | ||
/* | ||
* Copyright ©2018 vbill.cn. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* </p> | ||
*/ | ||
|
||
package cn.vbill.middleware.porter.manager; | ||
|
||
import cn.vbill.middleware.porter.manager.config.ManagerConfig; | ||
import cn.vbill.middleware.porter.common.cluster.ClusterProviderProxy; | ||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.Banner; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.web.servlet.ServletComponentScan; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
|
||
/** | ||
* @author: zhangkewei[[email protected]] | ||
* @date: 2017年12月15日 14:09 | ||
* @version: V1.0 | ||
* @review: zhangkewei[[email protected]]/2017年12月15日 14:09 | ||
*/ | ||
@EnableScheduling | ||
@EnableTransactionManagement | ||
@ServletComponentScan | ||
@SpringBootApplication(scanBasePackages = { "cn.vbill" }) | ||
@MapperScan("cn.vbill.middleware.porter.manager.core.mapper") | ||
public class ManagerBootApplication { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(ManagerBootApplication.class); | ||
|
||
public static void main(String[] args) throws Exception { | ||
SpringApplication app = new SpringApplication(ManagerBootApplication.class); | ||
app.setBannerMode(Banner.Mode.OFF); | ||
ConfigurableApplicationContext context = app.run(args); | ||
LOGGER.info(print()); | ||
LOGGER.info("ManagerApplication is success!"); | ||
// 注入spring工具类 | ||
ManagerContext.INSTANCE.setApplicationContext(context); | ||
// 获取配置 | ||
ManagerConfig config = context.getBean(ManagerConfig.class); | ||
try { | ||
ClusterProviderProxy.INSTANCE.initialize(config.getCluster()); | ||
} catch (Exception e) { | ||
ClusterProviderProxy.INSTANCE.stop(); | ||
LOGGER.error("集群模块初始化失败, 数据同步管理后台退出!error:" + e.getMessage()); | ||
throw new RuntimeException("集群模块初始化失败, 数据同步管理后台退出!error:" + e.getMessage()); | ||
} | ||
} | ||
|
||
private static String print() { | ||
StringBuffer sb = new StringBuffer(); | ||
sb.append(" \n"); | ||
sb.append(" _ooOoo_\n"); | ||
sb.append(" o8888888o\n"); | ||
sb.append(" 88\" . \"88\n"); | ||
sb.append(" (| -_- |)\n"); | ||
sb.append(" O\\ = /O\n"); | ||
sb.append(" ____/`---'\\____\n"); | ||
sb.append(" .' \\\\| |// `.\n"); | ||
sb.append(" / \\\\||| : |||// \\ \n"); | ||
sb.append(" / _||||| -:- |||||- \\ \n"); | ||
sb.append(" | | \\\\\\ - /// | |\n"); | ||
sb.append(" | \\_| ''\\---/'' | |\n"); | ||
sb.append(" \\ .-\\__ `-` ___/-. /\n"); | ||
sb.append(" ___`. .' /--.--\\ `. . __\n"); | ||
sb.append(" .\"\" '< `.___\\_<|>_/___.' >'\"\".\n"); | ||
sb.append(" | | : `- \\`.;`\\ _ /`;.`/ - ` : | |\n"); | ||
sb.append(" \\ \\ `-. \\_ __\\ /__ _/ .-` / /\n"); | ||
sb.append("======`-.____`-.___\\_____/___.-`____.-'======\n"); | ||
sb.append(" `=---='\n"); | ||
sb.append("...................................................\n"); | ||
return sb.toString(); | ||
} | ||
} | ||
/* | ||
* Copyright ©2018 vbill.cn. | ||
* <p> | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* </p> | ||
*/ | ||
|
||
package cn.vbill.middleware.porter.manager; | ||
|
||
import cn.vbill.middleware.porter.manager.config.ManagerConfig; | ||
import cn.vbill.middleware.porter.common.cluster.ClusterProviderProxy; | ||
import org.mybatis.spring.annotation.MapperScan; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.boot.Banner; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.boot.web.servlet.ServletComponentScan; | ||
import org.springframework.context.ConfigurableApplicationContext; | ||
import org.springframework.scheduling.annotation.EnableScheduling; | ||
import org.springframework.transaction.annotation.EnableTransactionManagement; | ||
|
||
/** | ||
* @author: zhangkewei[[email protected]] | ||
* @date: 2017年12月15日 14:09 | ||
* @version: V1.0 | ||
* @review: zhangkewei[[email protected]]/2017年12月15日 14:09 | ||
*/ | ||
@EnableScheduling | ||
@EnableTransactionManagement | ||
@ServletComponentScan | ||
@SpringBootApplication(scanBasePackages = { "cn.vbill" }) | ||
@MapperScan("cn.vbill.middleware.porter.manager.core.mapper") | ||
public class ManagerBootApplication { | ||
|
||
private static final Logger LOGGER = LoggerFactory.getLogger(ManagerBootApplication.class); | ||
|
||
public static void main(String[] args) throws Exception { | ||
SpringApplication app = new SpringApplication(ManagerBootApplication.class); | ||
app.setBannerMode(Banner.Mode.OFF); | ||
ConfigurableApplicationContext context = app.run(args); | ||
LOGGER.info("ManagerApplication is success!"); | ||
// 注入spring工具类 | ||
ManagerContext.INSTANCE.setApplicationContext(context); | ||
// 获取配置 | ||
ManagerConfig config = context.getBean(ManagerConfig.class); | ||
try { | ||
ClusterProviderProxy.INSTANCE.initialize(config.getCluster()); | ||
} catch (Exception e) { | ||
ClusterProviderProxy.INSTANCE.stop(); | ||
LOGGER.error("集群模块初始化失败, 数据同步管理后台退出!error:" + e.getMessage()); | ||
throw new RuntimeException("集群模块初始化失败, 数据同步管理后台退出!error:" + e.getMessage()); | ||
} | ||
} | ||
} |
55 changes: 0 additions & 55 deletions
55
manager/manager-boot/src/main/resources/application-sample.properties
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.