2016年12月21日

理解RESTful架构

摘要: 转自:http://www.ruanyifeng.com/blog/2011/09/restful.html RESTful架构,是目前最流行的一种互联网软件架构。它结构清晰、符合标准、易于理解、扩展方便,得到越来越多网站的采用。 一、起源 REST这个词,是Roy Thomas Fielding在 阅读全文

posted @ 2016-12-21 13:56 shuimx 阅读(136) 评论(0) 推荐(0)

2016年12月19日

启动时检查

摘要: 1. Dubbo缺省会在启动时检查依赖的服务是否可用,不可用时会抛出异常,阻止Spring初始化完成,以便上线时,能及早发现问题,默认check=true。 (如果你的Spring容器是懒加载的,或者通过API编程延迟引用服务,请关闭check,否则服务临时不可用时,会抛出异常,拿到null引用, 阅读全文

posted @ 2016-12-19 13:56 shuimx 阅读(164) 评论(0) 推荐(0)

2016年12月17日

新加的服务发布成功,但是调用时找不到

摘要: 日志:exception is java.lang.NoSuchMethodError: com.ejlerp.saleorder.api.SaleOrderWarehouseService.clearRetryNum(Lcom/ejlerp/common/vo/CallerInfo;Ljava/u 阅读全文

posted @ 2016-12-17 18:29 shuimx 阅读(267) 评论(0) 推荐(0)

2016年11月16日

单一职责原则

摘要: 单一职责原则:Single Responsibility Principle There should nerver be more than one reason for a class to change. 接口一定做到单一职责原则,类尽量做到只有一个原因引起变化。 阅读全文

posted @ 2016-11-16 20:06 shuimx 阅读(100) 评论(0) 推荐(0)

2016年11月2日

Failed opening .rdb for saving: Permission denied

摘要: 启动redis的账号权限不够。一般用root起。 参考:http://www.blogjava.net/liuyf8688/articles/403801.html 阅读全文

posted @ 2016-11-02 14:24 shuimx 阅读(357) 评论(0) 推荐(0)

2016年10月26日

定义/修改列时 NULL

摘要: mysql的文档说明: BLOB和TEXT列不能被赋予默认值。 如果在列定义中没有明确的DEFAULT值,则MySQL按照如下规则确定默认值: 如果列可以使用NULL作为值,则使用DEFAULT NULL子句对列进行定义。(在MySQL的早期版本中也如此。) 如果列不能使用NULL作为值,则MySQ 阅读全文

posted @ 2016-10-26 21:38 shuimx 阅读(348) 评论(0) 推荐(0)

2016年10月13日

@EnableAutoConfiguration

摘要: 1. spring文档 解释一: Enable auto-configuration of the Spring Application Context, attempting to guess and configure beans that you are likely to need. Aut 阅读全文

posted @ 2016-10-13 18:02 shuimx 阅读(458) 评论(0) 推荐(0)

@SpringBootApplication

摘要: 1. spring 文档说明 Many Spring Boot developers always have their main class annotated with @Configuration, @EnableAutoConfiguration and @ComponentScan. Si 阅读全文

posted @ 2016-10-13 16:41 shuimx 阅读(521) 评论(0) 推荐(0)

@Component

摘要: 1. 定义:注解类、接口、注解、枚举。 2. spring 文档说明: The @Repository annotation is a marker for any class that fulfills the role or stereotype (also known as Data Acce 阅读全文

posted @ 2016-10-13 16:34 shuimx 阅读(534) 评论(0) 推荐(0)

spring 自动扫描、注册的类是否可以定义构造函数

摘要: 答案是肯定的。 方法如下: SimpleMovieLister类会被spring扫描并注册到 ApplicationContext中。 要注意:1 构造函数用@Autowired 注解 2 构造函数的参数如果需要其他对象,则参数对象也要是可以自动注入的。 阅读全文

posted @ 2016-10-13 11:32 shuimx 阅读(211) 评论(0) 推荐(0)

导航