v5tech
v5tech
在maven的pom.xml中添加如下配置: ```xml org.apache.maven.wagon wagon-ssh 2.8 org.codehaus.mojo wagon-maven-plugin 1.0 upload-deploy package upload-single sshexec target/joyplus-manage-2.0.jar scp://root:***@106.214.240.250/opt true ```
AsyncTaskService 模拟后台耗时请求业务 ```java import org.joda.time.LocalDateTime; import org.springframework.stereotype.Service; import java.util.UUID; import java.util.concurrent.TimeUnit; @Service public class AsyncTaskService { public String uuid() { try { TimeUnit.MILLISECONDS.sleep(5000); System.out.println(LocalDateTime.now().toString("yyyy-MM-dd HH:mm:ss:S") + "--->工作线程(" + Thread.currentThread().getName() +...
http://www.dengshenyu.com/分布式系统/2017/11/12/kafka-producer.html http://www.dengshenyu.com/分布式系统/2017/11/21/kafka-data-delivery.html http://www.lpnote.com/2017/01/15/reliability-of-kafka-message https://kaimingwan.com/post/framworks/kafka/kafka-producerxing-neng-diao-you http://matt33.com/2017/09/04/kafka-best-pratice https://www.cnblogs.com/huxi2b/p/6056364.html
http://www.java67.com http://www.java-success.com http://www.journaldev.com/java-interview-questions http://javarevisited.blogspot.com http://java-latte.blogspot.com
https://stackoverflow.com/questions/12535016/apache-httpclient-get-with-body HttpGetWithEntity.java ```java import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; import org.apache.http.client.methods.HttpGet; import java.net.URI; public class HttpGetWithEntity extends HttpEntityEnclosingRequestBase { public HttpGetWithEntity() { super(); } public HttpGetWithEntity(URI uri) { super(); setURI(uri); } public HttpGetWithEntity(String uri)...
# 使用ffmpeg合并MP4文件 ``` bash ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f...
> Ubuntu 12.04.5 > mysql 5.5.47 > master1 192.168.64.131 > master2 192.168.64.132 ### 1. 修改mysql配置文件、创建帐号并授权 #### 1.1 修改master1上mysql配置文件my.conf ``` [mysqld] server-id = 131 #数据库ID log_bin = /var/log/mysql/mysql-bin.log #启用二进制日志 如果没有var/log/mysql这个目录,则需要创建. #binlog-do-db...
### 1. 安装Redis https://github.com/MSOpenTech/redis/releases/download/win-3.0.501/Redis-x64-3.0.501.msi 这里将Redis安装在`C:\Redis`目录下。 ### 2. 安装Ruby http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.4-x64.exe 这里将Ruby安装在`C:\Ruby22-x64`目录下。 ### 3. 安装Redis的Ruby库 ``` ruby gem install redis ``` ### 4. 配置Redis Node 拷贝6份Redis安装目录下的`redis.windows-service.conf`文件依次重命名为redis.6380.conf、redis.6381.conf、redis.6382.conf、redis.6383.conf、redis.6384.conf、redis.6385.conf。并分别修改这6个配置文件。具体修改内容如下: redis.6380.conf ``` port 6380 appendonly yes...
# nginx流量镜像ngx_http_mirror_module ## 背景 nginx官网公布了nginx1.13.4最新的ngx_http_mirror_module模块,利用mirror模块,可以将线上实时访问流量拷贝至其他环境,基于这些流量可以做版本发布前的预先验证,进行流量放大后的压测等等。 ## mirror模块配置 mirror模块配置分为两部分,源地址和镜像地址,配置位置可以为nginx配置文件的http, server, location上下文,配置示例为: ``` # original配置 location / { mirror /mirror; mirror_request_body off; proxy_pass http://127.0.0.1:9502; } ``` ``` # mirror配置 location /mirror {...
https://github.com/kohsuke/winsw 将`IntelliJIDEALicenseServer_windows_amd64.exe`注册为windows系统服务 下载`winsw.exe`文件,确保`winsw.exe`和`IntelliJIDEALicenseServer_windows_amd64.exe`位于同一目录 创建`winsw.xml`文件,确保文件名和`winsw.exe`名称一致且位于同一目录,其文件内容为 winsw.xml ```bash IntelliJIDEALicenseServer IntelliJIDEALicenseServer IntelliJIDEALicenseServer D:\IntelliJIDEALicenseServer\IntelliJIDEALicenseServer_windows_amd64.exe Automatic ``` 最后在命令行执行 ```bash winsw.exe install ``` 注册服务 ```bash winsw.exe uninstall ``` 卸载服务 ```bash winsw.exe help ``` 查看帮助 [winsw.zip](https://github.com/ameizi/DevArticles/files/1913757/winsw.zip)