using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO; using System.Li ...
分类:
其他好文 时间:
2020-04-14 16:55:07
阅读次数:
66
什么是Zuul? Zuul是Netflix开源的微服务网关。 Zuul可以和Eureka、Ribbon、Hystrix等组件配合使用。 Zuul的核心是一系列的过滤器,可以完成以下功能。 身份认证和安全:识别每个资源的验证请求,并拒绝那些与要求不符的请求。 审查与监控:在边缘位置追踪有意义的数据和统 ...
分类:
编程语言 时间:
2020-04-14 16:42:35
阅读次数:
69
import threadfrom time import sleep, ctime loops = [4,2]def loop0(): print 'start loop 0 at:', ctime() sleep(4) print 'loop 0 done at:', ctime() def l ...
分类:
编程语言 时间:
2020-04-14 16:37:04
阅读次数:
128
线程中断:Interrupt、isInterrupted、interrupted 线程并不是抢占式的,线程是协作式的。 Interrupt:声明此线程中断,但是线程并不会立即中断; isInterrupted:判断此线程是否已中断,判断完后不修改线程的中断状态; interrupted:判断此线程是 ...
分类:
其他好文 时间:
2020-04-14 00:59:37
阅读次数:
81
public class CountDownLatch { public static void main(String[] args) throws Exception{ java.util.concurrent.CountDownLatch countDownLatch = new java.u ...
分类:
其他好文 时间:
2020-04-13 23:08:55
阅读次数:
76
1 from socket import * 2 from threading import Thread 3 udp_socket = socket(AF_INET,SOCK_DGRAM) 4 #绑定端口 5 udp_socket.bind(('',8989)) 6 7 #不停接收 8 def r ...
分类:
编程语言 时间:
2020-04-13 22:34:00
阅读次数:
74
1 import time 2 from threading import Thread 3 from queue import Queue 4 class Producter(Thread): 5 def run(self): 6 global queue 7 count = 0 8 while ...
分类:
其他好文 时间:
2020-04-13 19:30:05
阅读次数:
57
Hystrix 熔断器默认超时时间是 1 秒钟,我们需要在配置中修改它的超时时间配置,同时也要设置 ribbon 的超时时间。 解决方法:application中配置以下 hystrix: command: default: execution: isolation: thread: timeout ...
分类:
编程语言 时间:
2020-04-13 12:39:01
阅读次数:
207
本机ip为10.10.10.11,监听端口443。 Bash环境下反弹TCP协议shell 首先在本地监听TCP协议443端口 然后在靶机上执行如下命令: Bash环境下反弹UDP协议shell: 首先在本地监听UDP协议443端口 然后在靶机上执行如下命令: 使用Netcat反弹shell 首先在 ...
分类:
系统相关 时间:
2020-04-13 12:21:13
阅读次数:
95
?123456789101112131415161718192021222324252627282930313233343536373839404142434445import java.util.concurrent.Callable;import java.util.concurrent.Exe ...
分类:
编程语言 时间:
2020-04-13 00:44:54
阅读次数:
82