漠北空城

听海观潮


  • 首页

  • 关于

  • 标签

  • 归档

  • 搜索

redis-sentinel安装、配置与故障与故障转移演示

发表于 2017-05-12

redis-sentinel安装、配置与故障与故障转移演示

redis-sentinel安装、配置与故障与故障转移演示
本次搭建,将会搭建一个redis-sentinel,其中包括一主两从三哨兵。架构图如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21


+-------------+ +-------------+ +-------------+
| Sentinel S1 |------| Sentinel S2 |------| Sentinel S3 |
+-------------+ +-------------+ +-------------+
| | |
| | |
+------+------+------+------+------+------+
|
|
+--------+
| Master |
+--------+
|
|
+------++------+------++------+
| |
| |
+-----------+ +-----------+
| Salve S1 | | Salve S2 |
+-----------+ +-----------+

阅读全文 »

代理模式

发表于 2017-04-06

代理模式

1、代理模式

1.1、应用场景

当程序涉及修改数据库中数据操作时,此时的一般操作流程是:

  • 1、开启事务
  • 2、修改操作
  • 3、提交事务或者回滚事务

随着时间的推移,代码中开启事务、提交事务及回滚事务的代码将变得冗余。记录日志在程序中也是推荐使用,那么记录日志也将变得冗余,同时设计具体业务操作的时候,往往还得考虑事务、日志等方面的操作,不能专注于业务操作。

为了解决代码冗余以及业务对象专注于业务操作,产生了代理模式。

1.2、组成部分

代理模式有以下5部分组成:

  • 1、target(目标对象/业务对象)
  • 2、proxy(代理对象)
  • 2、function(功能对象/事务对象、日志对象)
  • 3、interceptor(拦截器对象)
  • 4、client(客户端)
阅读全文 »

Maven安装依赖

发表于 2017-02-17

Maven安装依赖

环境信息:
Linux:CentOS release 6.5 (Final)
Nexus:2.14.2-01
Windows:Windows 7
Maven:3.2.3

1、本地安装依赖

1.1、下载

通过下载地址,下载合适的Maven文件

1.2、配置环境变量

新建系统变量MAVEN_HOME变量值:D:\apache-maven-3.2.3
编辑系统变量Path添加变量值:;%MAVEN_HOME%\bin
在CMD中通过mvn –version命令,检查是否配置正确

阅读全文 »

搭建Maven私服

发表于 2017-02-15

本文地址:搭建Maven私服
环境信息:
Linux:CentOS release 6.5 (Final)
Nexus:2.14.2-01


1、安装服务器

1.1、下载

下载如下文件(下载地址):
下载nexus

1.2、解压

解压下载的文件:

1
tar xzvf nexus-oss-webapp-1.8.0-bundle.tar.gz

阅读全文 »

Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean

发表于 2017-01-12

问题描述

最初使用Spring boot进行建立了一个web项目,能够对http请求进行响应,支持REST风格访问。现在想去除web特性,从而不再有端口依赖。于是将对应依赖由spring-boot-starter-web修改成spring-boot-starter,修改完之后,项目无法启动报错信息如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1191)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1180)
at com.hhly.information.InformationApplication.main(InformationApplication.java:25)
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:185)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:158)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
... 8 common frames omitted

阅读全文 »
1…567…14
漠北空城

漠北空城

69 日志
19 标签
链接
  • xyz327
© 2024 漠北空城
由 Hexo 强力驱动
|
主题 — NexT.Gemini v5.1.4
粤ICP备18054530号-2   |     |