- 浏览: 234350 次
- 性别:
- 来自: 深圳
最新评论
-
netwelfare:
文章的格式有点乱啊,看起来很费事啊。推荐看这个系列的json教 ...
java 操作JSON -
yangqingandjay:
ijoi刚好一个月[color=orange][align=c ...
spring 定时器配置 -
Jxdwuao:
不错, 很好用
spring 定时器配置 -
1870702720:
3楼说的可以,之前我一直以为想配置在一个定时器中,可是实现不了 ...
spring 定时器配置 -
taiwei.peng:
你可以配置两个定时器,这是我个人的想法,仅供参考。
spring 定时器配置
文章列表
1.完整的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion& ...
1.TopicRabbitConfig
package com.soft.rabbit.server.config;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.context.annotation. ...
1.完整的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion& ...
1.完整的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion& ...
1.完整的pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion& ...
1.完整的Pom文件
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> ...
第一台注册中心的配置,本机ip 10.10.10.11
server:
port: 1001
connection-timeout: 10000
spring:
application:
#应用名称服务名
name: IBMP-REGIST-CENTER
eureka:
server:
# 关闭自我保护模式(缺省为打开)
enable-self-preservation: false
# 清理间隔(毫秒,默认 60秒)
# eviction-interval-timer-in-ms: 10000
insta ...
ExecutorService中的submit(Callable)方法可以执行Callable任务,并且使用Future接口中的get()方法获取返回值。示例如下:
public class HomeRegNumCallable implements Callable<Map<String, Object>>{
private String newDate;
private String oldTime;
private HomePageMapper homePageMapper;
public HomeRegNumCallable(String newD ...
package com.wenbronk.javaes;
import java.net.InetSocketAddress;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map.Entry;
import org.elasticsearch.action.ListenableActionFuture;
import org.elasticsearch.action.get.GetRequestBuilder;
import org.elasticsearch.action.get.GetRe ...
查询数据结构
GET ibmpdb_hk/_mapping
查询所有
GET ibmpdb_hk/info/_search
或
GET ibmpdb_hk/_search
GET ibmpdb_hk/info/_search
{
"query" : {
"match_phrase" : {
"content" : "開戶"
}
}
}
GET ibmpdb_cn/info/_search
{
"query": {
"match_phra ...
#user nobody;
worker_processes 1;
error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_fo ...
package com.soft.util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLDecoder;
import java.nio.charset.Charset ...
# 创建新用户hadoop
useradd -m hadoop -s /bin/bash
passwd hadoop
密码是Dw.2016%
tar -zxvf hadoop-3.0.3.tar.gz
cd /usr/local/hadoop-3.0.3/etc/hadoop
1.修改hadoop-env.sh,配置java jdk路径
export JAVA_HOME=/usr/local/java
2.修改core-site.xml,配置内容如下
<property>
<name>fs.defaul ...
一. 安装elasticsearch
1.yum安装wget
yum -y install wget
2.下载安装 Elasticsearch
tar -zxvf elasticsearch-6.5.0.tar.gz
cd /usr/local/elasticsearch-6.5.0/bin
挂在后台,离开窗口不会停掉
./elasticsearch &
ps aux |grep elasticsearch
can not run elasticsearch as root
useradd es
passwd ...
三、实验环境
操作系统:CentOS 6.8_x64
Mysql版本:5.1.73(主从版本要一致)
Mysql安装:yum安装的方式
主 IP 地址:10.10.11.69(master)
从 IP 地址:10.10.11.70(slave)
四、主从的基本配置
1、对master的设置
修改 master 数据库的配置 ...