Commit Graph

684 Commits

Author SHA1 Message Date
Greg Turnquist
17543fc4fa #1119 - Include WebMvcConverters in WebFluxHateoasConfiguration. 2019-12-01 22:57:55 +01:00
Oliver Drotbohm
5ae89bcb2c #593 - Polishing.
Refactored existing unit tests to use the newly introduced test fixture type. Refactored ticket references to use the current style.
2019-11-28 15:01:16 +01:00
Oliver Drotbohm
d98e678c59 #593 - Make UriTemplate smarter to avoid reencoding of given URI strings.
UriTemplate now uses UriBuilderFactory (DefaultUriBuilderFactory in particular) to expand templates. We inspect the given source URI string, try to decode it and configure the factory to only encode values if the decoded String is shorter than the source one as that indicates it already contains encoded characters.

The UriBuilderFactory is held as transient value as its implementations are usually not serializable in the first place. Added the necessary logic to recreate the factory instance on deserialization.

Added all expansion tests given in the original ticket as unit tests.
2019-11-28 15:00:37 +01:00
Oliver Drotbohm
d3ece765bc #1127 - Avoid double encoding in UriTemplate.
We now directly use UriComponentsBuilder in UriTemplate.expand(…) to avoid potential double encoding in the base URI.
2019-11-28 11:14:57 +01:00
Oliver Drotbohm
5f016d6c9e #1119 - Avoid reference to spring-webmvc in configuration for RestTemplate.
RestTemplateHateoasConfiguration previously referred to HypermediaWebMvcConfigurer which is turn depending on WebMvcConfigurer, a type living in spring-webmvc. The very former would still get active in WebFlux as the web stack is selected based on the presence of either DispatcherServlet or DispatcherHandler. This is now resolved by using a WebMvcConverter indrection to handle the configuration tweaks avoiding the reference to interfaces from spring-webmvc.

Introduced an ArchUnit based test that Spring HATEOAS code only depends on Spring types containing references to reactive types from either the ….reactive package or classes starting with WebFlux.
2019-11-28 10:53:12 +01:00
Oliver Drotbohm
5444e14017 #1122 - Polishing. 2019-11-22 12:00:15 +01:00
Oliver Drotbohm
3d9fe3893f #1122 - Fixed generics declaration in RepresentationModelAssemblerSupport.
We constrained the RepresentationModel type parameter in a way that non of the RepresentationModel subclasses we provide aren't usable with it. That's now fixed by loosing that restriction to an arbitrary type.
2019-11-22 12:00:04 +01:00
Oliver Drotbohm
aa9e449841 #1121 - Shortcut ignored property lookups to prevent NullPointerExceptions. 2019-11-18 20:53:20 +01:00
Oliver Drotbohm
fc42597091 #1118 - Polishing.
Removed unnecessary log output from integration tests.
2019-11-18 20:29:19 +01:00
Oliver Drotbohm
d0198d5ff5 #1118 - Switch to ConcurrentReferenceHashMap to cache UriTemplate instances.
We now use Spring's ConcurrentReferenceHashMap to keep instances of UriTemplate cached but at the same time allow the cache entries to be garbage collected if necessary.
2019-11-18 20:27:54 +01:00
Greg Turnquist
37e1f501cf #1111 - Add 1.0.1.RELEASE to changelog.txt. 2019-11-03 10:53:21 -06:00
Greg Turnquist
667a4f4970 #1109 - Upgrade to Reactor Dysprosium-SR1. 2019-11-03 10:22:50 -06:00
Greg Turnquist
1506dfd154 #1107 - Upgrade to Spring Framework 5.2.1.RELEASE. 2019-11-03 10:16:37 -06:00
Oliver Drotbohm
4b814e8e14 #1103 - Add migration for ResourceAssemblerSupport -> RepresentationModelAssemblerSupport. 2019-10-25 09:00:52 +02:00
Greg Turnquist
cf0c606ef4 #1098 - Institute checks for client-only setups.
Gather client- and server-side settings into one "stack". Move all logic of checking this into the enum itself.
2019-10-24 14:11:17 -05:00
luvarqpp
f45aabe8ac #1101 - Migrate HAL_JSON_UTF8 to HAL_JSON.
org.springframework.hateoas.MediaTypes.HAL_JSON_UTF8 value was removed and only HAL_JSON is present. UTF8 is considered as default encoding for application/hal+json type.
2019-10-23 16:29:21 -05:00
Greg Turnquist
cbae7db2f1 #1100 - Update CI to use JDK 13 for edge testing. 2019-10-23 12:44:25 -05:00
Martin Otten
8c6dfc922c #1097 - Polishing some grammatical and spelling errors. 2019-10-21 08:46:32 -05:00
Greg Turnquist
b048c272e6 #1045 - Reduce visiblity of UriTemplate constructors.
Related issues: #1044
2019-10-10 14:17:08 -05:00
luvarqpp
4b234b63f2 #1091 - Polishing.
Fixed single char typo
2019-09-30 10:15:09 -05:00
Greg Turnquist
0d751eaf49 #1090 - Move master branch to 1.1.0.BUILD-SNAPSHOT. 2019-09-30 09:16:36 -05:00
Greg Turnquist
d0c69f4265 #1090 - Polishing. 2019-09-30 09:12:27 -05:00
Greg Turnquist
f0c2019f75 #1090 - Polishing. 2019-09-30 08:52:10 -05:00
Greg Turnquist
2357d8e143 #1090 - Test against Spring Framework 5.2.1 snapshots. 2019-09-30 08:33:25 -05:00
Greg Turnquist
9199bb9950 #1090 - Continue development on 1.0.1.BUILD-SNAPSHOT. 2019-09-30 08:31:03 -05:00
Greg Turnquist
5408014b3c #1090 - Releasing Spring HATEOAS 1.0.0.RELEASE. 2019-09-30 08:30:59 -05:00
Greg Turnquist
688315905d #1090 - Update CHANGELOG. 2019-09-30 08:11:48 -05:00
Greg Turnquist
e332b1b7c0 #1079 - Upgrade to Spring Framework 5.2.0.RELEASE. 2019-09-30 08:08:35 -05:00
Greg Turnquist
0e7bafc9c1 #1085 - Upgrade to Spring Plugin 2.0.0.RELEASE. 2019-09-30 08:07:03 -05:00
Oliver Drotbohm
507f7de0c3 #1075 - Explicitly use classpath protocol for base names of MessageResolver resource bundles.
We now explicitly equip the resource bundle base name with a "classpath:" prefix so that the resource lookup also works in Boot web applications in which the ResourceLoader setup is tweaked to prefer ServletContext resources.
2019-09-26 16:54:19 +02:00
Greg Turnquist
f15740fb25 #1038 - Update documentation and testing for ALPS.
Also make the ALPS types support deserialization using @JsonCreator-based private constructor calls.
2019-09-26 09:28:45 -05:00
Oliver Drotbohm
30ddf1873c #1080 - Improved configuration setup and documentation on EntityLinks.
We now explicitly only enable EntityLinks in WebMVC environments. This is also now reflected properly in the reference documentation.
2019-09-26 15:21:35 +02:00
Oliver Drotbohm
26a0dd8794 #1088 - Upgrade to Jackson 2.10 GA. 2019-09-26 14:40:54 +02:00
Oliver Drotbohm
d88a995ba8 #1089 - Upgrade to Reactor Dysprosium GA. 2019-09-25 10:16:13 +02:00
Oliver Drotbohm
c7065cacde #1088 - Upgrade to Jackson 2.10 preview 3. 2019-09-24 10:37:26 +02:00
Oliver Drotbohm
dbf1ee88f3 #1086 - Upgrade to Jackson BOM 2.9.9.20190807. 2019-09-23 14:54:20 +02:00
Oliver Drotbohm
3e805b0c30 #1085 - Upgrade to Spring Plugin 2.0 snapshots. 2019-09-23 14:54:06 +02:00
Colin Young
04d295abfe #1028 - Fix example in docs to reflect requirement for _prompt for property I18N. 2019-09-23 13:13:52 +02:00
Oliver Drotbohm
3d6dc9a52b #1079 - Upgrade to Spring Framework snapshots. 2019-09-23 13:12:23 +02:00
Oliver Drotbohm
1a2ddfaa2a #1075 - Improvements in I18N configuration setup.
We now avoid a double-lookup of the default messages in the resource bundle setup. Tightened the test case to make sure the sample resource bundle is properly used, even if no default messages bundle is present.
2019-09-20 22:40:33 +02:00
Greg Turnquist
9ddfdc8639 #1061 - Polishing. 2019-09-16 09:21:26 -05:00
Greg Turnquist
11485d4cae #1070 - Continue development on 1.0.0.BUILD-SNAPSHOT. 2019-09-05 10:31:25 -05:00
Greg Turnquist
f4143c93fe #1070 - Releasing Spring HATEOAS 1.0.0.RC2. 2019-09-05 10:31:23 -05:00
Greg Turnquist
21c888ccf5 #1070 - Tweak release script. 2019-09-05 10:31:04 -05:00
Greg Turnquist
4ede5245eb #1070 - Update changelogs. 2019-09-05 10:16:49 -05:00
Oliver Drotbohm
91a34f2517 #1072 - Moved null value inclusion configuration to the getter of HalFormsTemplate.title. 2019-09-05 17:13:03 +02:00
Greg Turnquist
36baafe764 #1062 - Update reference docs to show EntityLinks are a Spring Web MVC feature.
For now, EntityLinks is only properly support for Spring Web MVC. Developing this for WebFlux is in progress. Properly indicate this in the reference docs.

Related: #1071
2019-09-05 10:00:53 -05:00
Greg Turnquist
fd70fd90d2 #1061 - Reenable default codecs for WebFlux configuration.
With Spring WebFlux properly handling custom codecs, no need to disable the default handlers.

This commit verifies WebFlux configuration in test cases, and also adds an equivalent set of test cases verifying Web MVC configuration as well.

Supercedes: #1047
2019-09-05 09:38:49 -05:00
Greg Turnquist
85fe81e3a2 #1067 - Remove @EnableEntityLinks. 2019-09-05 06:56:22 -05:00
Greg Turnquist
ef9a45dd53 #1058 - Migrate off deprecated Spring APIs. 2019-09-05 06:52:39 -05:00