摘要: 设置用户名: git config --global user.name "username" 设置邮箱: git config --global user.email "email" 创建版本库: git init 文件添加到暂存区: git add 文件 文件提交到版本库: git commit 阅读全文
posted @ 2017-09-06 10:55 关键我是你力哥 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 关注公众号:程序猿王国 持续更新,每日分享 第一步:首先开启Feign对Hystrix的支持,在properties文件中添加以下配置: feign.hystrix.enabled=true. 第二步:在上一篇Feign的基础上添加Hystrix(断路由) @FeignClient(name = " 阅读全文
posted @ 2017-07-29 00:30 关键我是你力哥 阅读(8841) 评论(0) 推荐(0) 编辑
摘要: 添加依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency> <dependency> <group 阅读全文
posted @ 2017-07-26 10:04 关键我是你力哥 阅读(3571) 评论(0) 推荐(0) 编辑
摘要: 网上很多博客写的都是在本地一台机器上面搭建的,我用两台机器来为大家搭建一个注册中心高可用集群 第一步:需要在每一台机器上面搭建一个注册中心。 第二步:编写第一台机器注册中心配置文件 第三步:编写第二台机器注册中心配置文件 这里需要注意的是eureka.client.serviceUrl.defaul 阅读全文
posted @ 2017-07-19 12:52 关键我是你力哥 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 第一步加入依赖: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-hystrix</artifactId> <version>1.2.6.RELEASE</versi 阅读全文
posted @ 2017-07-14 16:19 关键我是你力哥 阅读(943) 评论(0) 推荐(0) 编辑
摘要: 关注公众号:程序猿王国 持续更新,每日分享 在配置文件中添加配置如下(我使用的是多数据源): spring.datasource.primary.url=jdbc\:mysql\://localhost\:3306/test?useUnicode\=true&characterEncoding\=u 阅读全文
posted @ 2017-07-14 12:04 关键我是你力哥 阅读(86669) 评论(0) 推荐(2) 编辑
摘要: 关注公众号:程序猿王国 持续更新,每日分享 准备环境: 一个springBoot工程 第一步:添加以下依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuato 阅读全文
posted @ 2017-07-11 15:07 关键我是你力哥 阅读(11200) 评论(0) 推荐(1) 编辑
摘要: 第一步:编写application.properties文件 spring.application.name=api-gateway server.port=5555 zuul.routes.users.path=/users/** zuul.routes.users.stripPrefix=tru 阅读全文
posted @ 2017-07-10 21:23 关键我是你力哥 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 准备环境: jdk1.8 eclipse tomcat8.0 第一步:在配置文件添加如下信息: spring.datasource.primary.url=jdbc:mysql://localhost:3306/test1 spring.datasource.primary.username=tes 阅读全文
posted @ 2017-07-10 21:16 关键我是你力哥 阅读(857) 评论(0) 推荐(1) 编辑
摘要: public class Dichotomy { //定义查找次数 static int count = 0; public static void main(String[] args) { //定义数组 int [] array = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 阅读全文
posted @ 2017-05-22 10:31 关键我是你力哥 阅读(1217) 评论(0) 推荐(0) 编辑