-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
JavaBeans spec:
getUrl/setUrl => property name: url
getURL/setURL => property name: URL
Jackson:
getUrl/setUrl => property name: url
getURL/setURL => property name: url
JavaBeans(TM) Specification 1.01 Final Release
8.8 Capitalization of inferred names.
http://download.oracle.com/otndocs/jcp/7224-javabeans-1.01-fr-spec-oth-JSpec/
Introspector.decapitalize
http://docs.oracle.com/javase/8/docs/api/java/beans/Introspector.html#decapitalize-java.lang.String-
Background:
Ajax post data: URL=example.com
(Content-Type: application/x-www-form-urlencoded)
+
POJO: getURL/setURL
+
Spring MVC
=> HTTP 200 OK
Ajax post data: {"URL":"example.com"}
(Content-Type: application/json)
+
POJO: getURL/setURL
+
Spring MVC @RequestBody (Jackson Integration)
=> HTTP 400 Bad Request