源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 配置文件位于resources下,项目以单元测试的方式进行测试. 1.2 依赖说明 除了spring的基本依赖外,需要导入mongodb整合依赖包 <!--spring mongodb 整合依赖--> <dependency> <groupId>org.springframework.data</groupI…
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 配置文件位于com.heibaiying.config下,项目以单元测试的方式进行测试. 1.2 依赖说明 除了spring的基本依赖外,需要导入mongodb整合依赖包 <!--spring mongodb 整合依赖--> <dependency> <groupId>org.springframework.dat…
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 本用例关于rabbitmq的整合提供简单消息发送和对象消费发送两种情况下的sample. rabbitBaseAnnotation.java中声明了topic类型的交换机.持久化队列.及其绑定关系,用于测试说明topic交换机路由键的绑定规则. rabbitObjectAnnotation.java中声明了direct类型的交换机,持久化队…
文章目录 一.说明 1.1 XMemcached客户端说明 1.2 项目结构说明 1.3 依赖说明 二.spring 整合 memcached 2.1 单机配置 2.2 集群配置 2.3 存储基本类型测试用例 2.5 存储实体对象测试用例 附:memcached 基本命令 源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 XMemcached客户端说明 XMemcached是基于java nio的mem…
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 项目模拟一个简单的群聊功能,为区分不同的聊天客户端,登录时候将临时用户名存储在session当中: CustomHander为消息的自定义处理器: CustomHandershakerInterceptor为自定义的 websocket 的握手拦截器: 项目以web的方式构建. 1.2 依赖说明 除了基本的spring 依赖外,还需要导入w…
文章目录 一. 项目结构说明 二.项目依赖 三.公共模块(dubbo-common) 四. 服务提供者(dubbo-provider) 4.1 productService是服务的提供者( 商品数据用模拟数据展示) 4.2 在dubbo.xml暴露服务 五.服务消费者(dubbo-consumer) 1.在dubbo.xml调用远程的服务 2.消费服务 六.项目构建的说明 七.关于dubbo新版本管理控制台的安装说明 源码Gitub地址:https://github.com/heibaiying…
文章目录 一.搭建hello spring工程 1.1 项目搭建 1.2 相关配置讲解 二.配置自定义拦截器 三.全局异常处理 四.参数绑定 4.1 参数绑定 4.2 关于日期格式转换的三种方法 五.数据校验 六.文件上传与下载 6.1 文件上传 6.2 文件下载 七.Restful风格的请求 源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.搭建hello spring工程 1.1 项目搭建 1.新建maven w…
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 本用例关于rabbitmq的整合提供简单消息发送和对象消费发送两种情况下的sample. rabbitBaseAnnotation.java中声明了topic类型的交换机.持久化队列.及其绑定关系,用于测试说明topic交换机路由键的绑定规则. rabbitObjectAnnotation.java中声明了direct类型的交换机,持久化队…
文章目录 一.说明 1.1 XMemcached客户端说明 1.2 项目结构说明 1.3 依赖说明 二.spring 整合 memcached 2.1 单机配置 2.2 集群配置 2.3 存储基本类型测试用例 2.5 存储实体对象测试用例 附:memcached 基本命令 源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 XMemcached客户端说明 XMemcached是基于java nio的mem…
源码Gitub地址:https://github.com/heibaiying/spring-samples-for-all 一.说明 1.1 项目结构说明 项目模拟一个简单的群聊功能,为区分不同的聊天客户端,登录时候将临时用户名存储在session当中: webconfig 包是基础注解的方式配置web,在spring-base-annotation项目中已经讲解过每个类作用: CustomHander为消息的自定义处理器: CustomHandershakerInterceptor为自定义的…