2017年9月7日
摘要:
Provider.java Service.java Services.java Test.java
阅读全文
posted @ 2017-09-07 17:56
力奋
阅读(276)
推荐(0)
摘要:
public enum Elvis { INSTANCE; public void leaveTheBuilding() { System.out.println("Whoa baby, I'm outta here!"); } // This code would normally appear outside the class! public static void ma...
阅读全文
posted @ 2017-09-07 17:48
力奋
阅读(285)
推荐(0)
摘要:
public class UtilityClass { // Suppress default constructor for noninstantiability private UtilityClass() { throw new AssertionError(); } }
阅读全文
posted @ 2017-09-07 17:19
力奋
阅读(243)
推荐(0)
2017年9月5日
摘要:
事件通知与观察者模式类似,参照《Java软件体系结构设计模式标准指南》P258,代码https://github.com/birdstudiocn/design-patterns-example/tree/master/src/38 事件接口 事件容器类 事件注册类 事件目标实现类,Observab
阅读全文
posted @ 2017-09-05 10:55
力奋
阅读(528)
推荐(0)
摘要:
静态工厂方法+服务提供者框架模板 构造器模板 事件通知模板 单元素枚举类型singleton模块 私有构造器不可实例化类模板 构造器模板 事件通知模板 单元素枚举类型singleton模块
阅读全文
posted @ 2017-09-05 10:53
力奋
阅读(757)
推荐(0)
2017年8月25日
摘要:
package org.effectivejava.examples.chapter02.item02.builder; public class NutritionFacts { private final int servingSize; private final int servings; private final int calories; private final in...
阅读全文
posted @ 2017-08-25 15:01
力奋
阅读(248)
推荐(0)
2017年8月24日
摘要:
摘要 本文将介绍领域驱动设计(Domain Driven Design)的官方参考架构,该架构分成了Interfaces、Applications和Domain三层以及包含各类基础设施的Infrastructure。本文会对架构中一些重要组件和问题进行讨论,给出一些分析结论。本文原文连接:http:
阅读全文
posted @ 2017-08-24 17:38
力奋
阅读(264)
推荐(0)
2017年8月16日
摘要:
实现用例分析 上篇基于Kafka消息驱动最终一致事务(一)介绍BASE的理论,接着我们引入一个实例看如何实现BASE,我们会用图7显示的算法实现BASE。 首先介绍使用技术栈 JDK:1.8 Spring:spring-boot,spring-data-jpa 数据库:Mysql 消息服务器:Kaf
阅读全文
posted @ 2017-08-16 14:00
力奋
阅读(8633)
推荐(0)
2017年7月19日
摘要:
基本可用软状态最终一致事务 本用例分两个数据库分别是用户库和交易库,不使用分布式事务,使用基于消息驱动实现基本可用软状态最终一致事务(BASE)。现在说明下事务逻辑演化步骤,尊从CAP原则,即分布式系统不能全部确保一致性、可用性、分区容错性,只能三选二。文章里从一致性模式讨论,例子里每次出售物品时,
阅读全文
posted @ 2017-07-19 10:41
力奋
阅读(2078)
推荐(0)
2017年7月11日
摘要:
本文程序集成了Spring-boot、Spring-batch、Spring-data-jpa、hibernate、Quartz、H2等。完整代码在Github上共享,地址https://github.com/birdstudiocn/spring-sample 这程序功能是简单批量读取文件记录,然
阅读全文
posted @ 2017-07-11 09:56
力奋
阅读(947)
推荐(0)