Page:
Base Utils
Pages
ActiveMQ
Ajax
AssertJ
BDD
Base Utils
BluePrintCSS(Deprecated)
CXF
Caching
Change4
ChangeLog
CreateNewProject
Crypto
Database
Datasource
DateTime
Design
Dozer
Eclipse
Ehcache
Email
Executable War
Graphite Windows
Graphite
Guava Cache
H2 Database
Hibernate Validator
High Performance Utils
Home
Home4.0
HttpClient
Hystrix
JMeter
JPA
JQuery Validation Plugin
JQuery
JSP
Jaxb
Jersey(Deprecated)
Jetty
Jmx
Json
Log
Logstash
Maven
Memcached
Metrics library
Mock
Monitoring and Metrics
MyBatis
Nodejs
Non Function
Performace test
Profiler
QuickStart
Rate Limiter
Redis
Reflection
ReleaseProcess(Internal)
Schedule
Selenium2
Serialize
Shiro Security
Simulator
SiteMesh
Sonar
Spring Data JPA
Spring MVC
Spring Restful Service
Spring
SpringSide Utils Overview
System Protection
Test Overview
Text
Transaction
Travis CI
Tutorial
Twitter Bootstrap
Unit Test
Validation
YUI Compressor
git
Clone
Table of Contents
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
防御式编程工具集
Spring, Common Lang, Guava都有提供校验参数的防御式编程API,选用Apache Commons Lang的Validate。
Spring的Assert,很容易和junit的Assert弄乱,而且校验函数没有返回输入参数的能力,而且出错信息也没有格式化字符串+自定义参数的能力。
Guava的Preconditions,一是名字太长了,二是Validate的方法更多,比如noNullElements()判断多个元素都不为空
MoreValidate主要参考Guava的MathPreconditions, 补充数字为正数或非负数的校验。
异常工具集
Springside-core自己感觉常用需求整理了Exceptions。
- unchecked(), 将CheckedException转化为RuntimeException的方法
- getStackTraceAsString(), 将整个Exception Stack所有消息转化为一个String
- isCausedBy(), 判断异常是否由某些底层异常引起