Oliver Drotbohm
6575a8ddae
#998 - WebMvcHateoasConfiguration now delays a beans-of-type lookup.
...
We now delay the lookup of RepresentationModelProcessor instances in WebMvcHateoasConfiguration so that the BeanPostProcessor registered does now not trigger eager initialization of downstream beans.
2019-06-05 19:50:11 +02:00
Jens Schauder
09ac7fb0c0
#859 - Polishing.
...
Changed http urls to https.
Minor changes to formatting.
2019-05-08 18:44:59 +02:00
Greg Turnquist
1e621784e7
#859 - Fix RepresentationModelProcessor to smoothly register with Spring MVC.
...
Some more polishing on internal of Processor and Invoker machinery regarding resource -> model, etc.
2019-05-08 18:44:59 +02:00
Oliver Drotbohm
a0937f7c28
#977 - Simplified recreation of LinkBuilderSupport.
...
LinkBuilderSupport's constructor now obtains a UriComponentsBuilder in a less complicated way.
Benchmarks before:
Benchmark Mode Cnt Score Error Units
ControllerLinkBuilderBenchmark.simpleLinkCreation thrpt 20 40,462 ± 1,572 ops/s
Benchmarks after:
Benchmark Mode Cnt Score Error Units
ControllerLinkBuilderBenchmark.simpleLinkCreation thrpt 20 41,158 ± 0,624 ops/s
2019-04-05 22:33:53 +02:00
Oliver Drotbohm
39404ea2d9
#977 - Performance improvements in link generation.
...
Introduced more caches for reusable value objects: UriTemplate, MethodParameters. Cache UriTemplate.toString() to avoid re-computation. Avoid recomputing the affordances if possible in WebHandler. Removed cache in AnnotatedParametersParameterAccessor as that one now transitively benefits from the one introduced in MethodParameters.
Related ticket: spring-projects/spring-framework#22730 .
2019-04-03 18:39:40 +02:00
Greg Turnquist
fc3767b90b
#867 - Reenable default encoders and encoders.
...
Thanks to https://github.com/spring-projects/spring-framework/issues/22612 , Spring HATEAOAS no longer has to disable the default registry of encoders and decoders to get its custom components to work.
Related issues: #885 , https://github.com/spring-projects/spring-framework/issues/22612
2019-04-03 11:08:36 -05:00
Greg Turnquist
f9a0c0fb13
#971 - Polishing.
2019-04-02 13:08:54 -05:00
Oliver Drotbohm
f27160d16f
#973 - Explicit configuration options for web stacks.
...
@EnableHypermediaSupport now exposes a "stacks" attribute to limit the enablement of hypermedia functionality to a certain web stack.
2019-04-02 15:42:28 +02:00
Spring Operator
0e02d4f041
#910 - URL cleanup.
...
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# Fixed URLs
## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.
* [ ] http://www.apache.org/licenses/ with 2 occurrences migrated to:
https://www.apache.org/licenses/ ([https](https://www.apache.org/licenses/ ) result 200).
* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 268 occurrences migrated to:
https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0 ) result 200).
2019-03-22 17:32:52 +01:00
Oliver Drotbohm
bf5b8c0e76
#891 - Overhauled reference documentation on EntityLinks.
...
Added new paragraphs on EntityLinks, ControllerEntityLinks, TypedEntityLinks and using EntityLinks as SPI.
Polished Javadoc of ControllerEntityLinks and its unit tests.
2019-03-22 16:49:17 +01:00
Spring Operator
dd910f77df
#890 - URL cleanup.
...
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).
# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.
* [ ] http://alps.io (200) with 1 occurrences could not be migrated:
([https](https://alps.io ) result AnnotatedConnectException).
* [ ] http://alps.io/spec/ (200) with 6 occurrences could not be migrated:
([https](https://alps.io/spec/ ) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/ (200) with 1 occurrences could not be migrated:
([https](https://amundsen.com/media-types/collection/ ) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/examples/ (200) with 7 occurrences could not be migrated:
([https](https://amundsen.com/media-types/collection/examples/ ) result AnnotatedConnectException).
* [ ] http://amundsen.com/media-types/collection/format/ (200) with 2 occurrences could not be migrated:
([https](https://amundsen.com/media-types/collection/format/ ) result AnnotatedConnectException).
* [ ] http://stateless.co/hal_specification.html (200) with 2 occurrences could not be migrated:
([https](https://stateless.co/hal_specification.html ) result SSLHandshakeException).
* [ ] http://www.opensearch.org/Specifications/OpenSearch/1.1 (200) with 1 occurrences could not be migrated:
([https](https://www.opensearch.org/Specifications/OpenSearch/1.1 ) result SSLHandshakeException).
* [ ] http://foo.com/bar (301) with 8 occurrences could not be migrated:
([https](https://foo.com/bar ) result SSLHandshakeException).
* [ ] http://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html (302) with 1 occurrences could not be migrated:
([https](https://www.csse.monash.edu.au/~damian/papers/HTML/Plurals.html ) result SSLHandshakeException).
* [ ] http://alps.io/ext/range (404) with 2 occurrences could not be migrated:
([https](https://alps.io/ext/range ) result AnnotatedConnectException).
# Fixed URLs
## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.
* [ ] http://tools.ietf.org/html/draft-kelly-json-hal (301) with 2 occurrences migrated to:
https://tools.ietf.org/html/draft-kelly-json-hal ([https](https://tools.ietf.org/html/draft-kelly-json-hal ) result ReadTimeoutException).
* [ ] http://api.acme.com/foo/ (UnknownHostException) with 1 occurrences migrated to:
https://api.acme.com/foo/ ([https](https://api.acme.com/foo/ ) result UnknownHostException).
* [ ] http://barfoo:8888 (UnknownHostException) with 2 occurrences migrated to:
https://barfoo:8888 ([https](https://barfoo:8888 ) result UnknownHostException).
* [ ] http://examples.org/blogs/jdoe (UnknownHostException) with 7 occurrences migrated to:
https://examples.org/blogs/jdoe ([https](https://examples.org/blogs/jdoe ) result UnknownHostException).
* [ ] http://examples.org/blogs/msmith (UnknownHostException) with 4 occurrences migrated to:
https://examples.org/blogs/msmith ([https](https://examples.org/blogs/msmith ) result UnknownHostException).
* [ ] http://examples.org/blogs/rwilliams (UnknownHostException) with 4 occurrences migrated to:
https://examples.org/blogs/rwilliams ([https](https://examples.org/blogs/rwilliams ) result UnknownHostException).
* [ ] http://examples.org/images/jdoe (UnknownHostException) with 7 occurrences migrated to:
https://examples.org/images/jdoe ([https](https://examples.org/images/jdoe ) result UnknownHostException).
* [ ] http://examples.org/images/msmith (UnknownHostException) with 4 occurrences migrated to:
https://examples.org/images/msmith ([https](https://examples.org/images/msmith ) result UnknownHostException).
* [ ] http://examples.org/images/rwilliams (UnknownHostException) with 4 occurrences migrated to:
https://examples.org/images/rwilliams ([https](https://examples.org/images/rwilliams ) result UnknownHostException).
* [ ] http://foobar (UnknownHostException) with 1 occurrences migrated to:
https://foobar ([https](https://foobar ) result UnknownHostException).
* [ ] http://foobar:8088 (UnknownHostException) with 2 occurrences migrated to:
https://foobar:8088 ([https](https://foobar:8088 ) result UnknownHostException).
* [ ] http://foobarhost/ (UnknownHostException) with 2 occurrences migrated to:
https://foobarhost/ ([https](https://foobarhost/ ) result UnknownHostException).
* [ ] http://foobarhost:9090/ (UnknownHostException) with 2 occurrences migrated to:
https://foobarhost:9090/ ([https](https://foobarhost:9090/ ) result UnknownHostException).
* [ ] http://myhost/cart/42 (UnknownHostException) with 1 occurrences migrated to:
https://myhost/cart/42 ([https](https://myhost/cart/42 ) result UnknownHostException).
* [ ] http://myhost/inventory/12 (UnknownHostException) with 3 occurrences migrated to:
https://myhost/inventory/12 ([https](https://myhost/inventory/12 ) result UnknownHostException).
* [ ] http://myhost/people/42 (UnknownHostException) with 2 occurrences migrated to:
https://myhost/people/42 ([https](https://myhost/people/42 ) result UnknownHostException).
* [ ] http://myhost/person/1 (UnknownHostException) with 1 occurrences migrated to:
https://myhost/person/1 ([https](https://myhost/person/1 ) result UnknownHostException).
* [ ] http://myhost/person/1/orders (UnknownHostException) with 1 occurrences migrated to:
https://myhost/person/1/orders ([https](https://myhost/person/1/orders ) result UnknownHostException).
* [ ] http://proxy1:1443 (UnknownHostException) with 2 occurrences migrated to:
https://proxy1:1443 ([https](https://proxy1:1443 ) result UnknownHostException).
* [ ] http://somehost/bar (UnknownHostException) with 1 occurrences migrated to:
https://somehost/bar ([https](https://somehost/bar ) result UnknownHostException).
* [ ] http://somehost/foo (UnknownHostException) with 1 occurrences migrated to:
https://somehost/foo ([https](https://somehost/foo ) result UnknownHostException).
* [ ] http://somehost/foo/ (UnknownHostException) with 1 occurrences migrated to:
https://somehost/foo/ ([https](https://somehost/foo/ ) result UnknownHostException).
* [ ] http://somehost/foo/bar (UnknownHostException) with 1 occurrences migrated to:
https://somehost/foo/bar ([https](https://somehost/foo/bar ) result UnknownHostException).
* [ ] http://somehost/foo/bar/foobar (UnknownHostException) with 1 occurrences migrated to:
https://somehost/foo/bar/foobar ([https](https://somehost/foo/bar/foobar ) result UnknownHostException).
* [ ] http://somethingDifferent (UnknownHostException) with 2 occurrences migrated to:
https://somethingDifferent ([https](https://somethingDifferent ) result UnknownHostException).
* [ ] http://acme.com/rels/foo-bar (404) with 2 occurrences migrated to:
https://acme.com/rels/foo-bar ([https](https://acme.com/rels/foo-bar ) result 404).
* [ ] http://example.com/api (404) with 2 occurrences migrated to:
https://example.com/api ([https](https://example.com/api ) result 404).
* [ ] http://example.com/custom/deprecated (404) with 1 occurrences migrated to:
https://example.com/custom/deprecated ([https](https://example.com/custom/deprecated ) result 404).
* [ ] http://example.com/customers/deprecated (404) with 6 occurrences migrated to:
https://example.com/customers/deprecated ([https](https://example.com/customers/deprecated ) result 404).
* [ ] http://example.com/rels/ (404) with 2 occurrences migrated to:
https://example.com/rels/ ([https](https://example.com/rels/ ) result 404).
* [ ] http://example.com/rels/persons (404) with 1 occurrences migrated to:
https://example.com/rels/persons ([https](https://example.com/rels/persons ) result 404).
* [ ] http://example.org/blogs/wchandry (404) with 3 occurrences migrated to:
https://example.org/blogs/wchandry ([https](https://example.org/blogs/wchandry ) result 404).
* [ ] http://example.org/friends/ (404) with 19 occurrences migrated to:
https://example.org/friends/ ([https](https://example.org/friends/ ) result 404).
* [ ] http://example.org/friends/?queries (404) with 3 occurrences migrated to:
https://example.org/friends/?queries ([https](https://example.org/friends/?queries ) result 404).
* [ ] http://example.org/friends/?template (404) with 3 occurrences migrated to:
https://example.org/friends/?template ([https](https://example.org/friends/?template ) result 404).
* [ ] http://example.org/friends/jdoe (404) with 6 occurrences migrated to:
https://example.org/friends/jdoe ([https](https://example.org/friends/jdoe ) result 404).
* [ ] http://example.org/friends/msmith (404) with 3 occurrences migrated to:
https://example.org/friends/msmith ([https](https://example.org/friends/msmith ) result 404).
* [ ] http://example.org/friends/rss (404) with 7 occurrences migrated to:
https://example.org/friends/rss ([https](https://example.org/friends/rss ) result 404).
* [ ] http://example.org/friends/rwilliams (404) with 3 occurrences migrated to:
https://example.org/friends/rwilliams ([https](https://example.org/friends/rwilliams ) result 404).
* [ ] http://example.org/friends/search (404) with 4 occurrences migrated to:
https://example.org/friends/search ([https](https://example.org/friends/search ) result 404).
* [ ] http://example.org/images/wchandry (404) with 3 occurrences migrated to:
https://example.org/images/wchandry ([https](https://example.org/images/wchandry ) result 404).
* [ ] http://example.org/rels/todo (404) with 3 occurrences migrated to:
https://example.org/rels/todo ([https](https://example.org/rels/todo ) result 404).
* [ ] http://example.org/samples/full/doc.html (404) with 3 occurrences migrated to:
https://example.org/samples/full/doc.html ([https](https://example.org/samples/full/doc.html ) result 404).
* [ ] http://pubsubhubbub.googlecode.com (404) with 1 occurrences migrated to:
https://pubsubhubbub.googlecode.com ([https](https://pubsubhubbub.googlecode.com ) result 404).
* [ ] http://www.example.com/rels/ (404) with 1 occurrences migrated to:
https://www.example.com/rels/ ([https](https://www.example.com/rels/ ) result 404).
## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.
* [ ] http://docs.spring.io/spring-hateoas/docs/current/reference/html/ with 1 occurrences migrated to:
https://docs.spring.io/spring-hateoas/docs/current/reference/html/ ([https](https://docs.spring.io/spring-hateoas/docs/current/reference/html/ ) result 200).
* [ ] http://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf with 1 occurrences migrated to:
https://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf ([https](https://docs.spring.io/spring-hateoas/docs/current/reference/pdf/spring-hateoas-reference.pdf ) result 200).
* [ ] http://en.wikipedia.org/wiki/HATEOAS with 2 occurrences migrated to:
https://en.wikipedia.org/wiki/HATEOAS ([https](https://en.wikipedia.org/wiki/HATEOAS ) result 200).
* [ ] http://example.com?name=foo with 1 occurrences migrated to:
https://example.com?name=foo ([https](https://example.com?name=foo ) result 200).
* [ ] http://mamund.site44.com/misc/hal-forms/ with 1 occurrences migrated to:
https://mamund.site44.com/misc/hal-forms/ ([https](https://mamund.site44.com/misc/hal-forms/ ) result 200).
* [ ] http://uberhypermedia.org/ (302) with 2 occurrences migrated to:
https://rawgit.com/uber-hypermedia/specification/master/uber-hypermedia.html ([https](https://uberhypermedia.org/ ) result 200).
* [ ] http://tools.ietf.org/html/draft-kelly-json-hal-05 with 1 occurrences migrated to:
https://tools.ietf.org/html/draft-kelly-json-hal-05 ([https](https://tools.ietf.org/html/draft-kelly-json-hal-05 ) result 200).
* [ ] http://tools.ietf.org/html/rfc6570 with 1 occurrences migrated to:
https://tools.ietf.org/html/rfc6570 ([https](https://tools.ietf.org/html/rfc6570 ) result 200).
* [ ] http://www.example.com with 2 occurrences migrated to:
https://www.example.com ([https](https://www.example.com ) result 200).
* [ ] http://www.hixie.ch/specs/pingback/pingback with 1 occurrences migrated to:
https://www.hixie.ch/specs/pingback/pingback ([https](https://www.hixie.ch/specs/pingback/pingback ) result 200).
* [ ] http://www.iana.org/assignments/link-relations/link-relations.xhtml with 2 occurrences migrated to:
https://www.iana.org/assignments/link-relations/link-relations.xhtml ([https](https://www.iana.org/assignments/link-relations/link-relations.xhtml ) result 200).
* [ ] http://www.w3.org/TR/2011/WD-html5-20110113/links.html with 1 occurrences migrated to:
https://www.w3.org/TR/2011/WD-html5-20110113/links.html ([https](https://www.w3.org/TR/2011/WD-html5-20110113/links.html ) result 200).
* [ ] http://www.w3.org/TR/html5/links.html with 11 occurrences migrated to:
https://www.w3.org/TR/html5/links.html ([https](https://www.w3.org/TR/html5/links.html ) result 200).
* [ ] http://www.w3.org/TR/powder-dr/ with 1 occurrences migrated to:
https://www.w3.org/TR/powder-dr/ ([https](https://www.w3.org/TR/powder-dr/ ) result 200).
* [ ] http://www.w3.org/TR/preload/ with 1 occurrences migrated to:
https://www.w3.org/TR/preload/ ([https](https://www.w3.org/TR/preload/ ) result 200).
* [ ] http://www.w3.org/TR/resource-hints/ with 1 occurrences migrated to:
https://www.w3.org/TR/resource-hints/ ([https](https://www.w3.org/TR/resource-hints/ ) result 200).
* [ ] http://www.w3.org/TR/webmention/ with 1 occurrences migrated to:
https://www.w3.org/TR/webmention/ ([https](https://www.w3.org/TR/webmention/ ) result 200).
* [ ] http://amazon.com with 4 occurrences migrated to:
https://amazon.com ([https](https://amazon.com ) result 301).
* [ ] http://contributor-covenant.org with 1 occurrences migrated to:
https://contributor-covenant.org ([https](https://contributor-covenant.org ) result 301).
* [ ] http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/ ) result 301).
* [ ] http://www.w3.org/TR/1999/REC-html401-19991224 with 10 occurrences migrated to:
https://www.w3.org/TR/1999/REC-html401-19991224 ([https](https://www.w3.org/TR/1999/REC-html401-19991224 ) result 301).
* [ ] http://www.w3.org/TR/curie with 1 occurrences migrated to:
https://www.w3.org/TR/curie ([https](https://www.w3.org/TR/curie ) result 301).
* [ ] http://tools.ietf.org/html/rfc5988=section-4 with 1 occurrences migrated to:
https://tools.ietf.org/html/rfc5988=section-4 ([https](https://tools.ietf.org/html/rfc5988=section-4 ) result 302).
* [ ] http://www.springsource.org/download with 1 occurrences migrated to:
https://www.springsource.org/download ([https](https://www.springsource.org/download ) result 302).
# Ignored
These URLs were intentionally ignored.
* http://localhost with 11 occurrences
* http://localhost/ with 1 occurrences
* http://localhost/customers/15 with 1 occurrences
* http://localhost/employees with 56 occurrences
* http://localhost/employees/0 with 34 occurrences
* http://localhost/employees/1 with 15 occurrences
* http://localhost/employees/2 with 24 occurrences
* http://localhost/sample/1/foo with 1 occurrences
* http://localhost/sample/2/bar with 1 occurrences
* http://localhost/something/bar/foo with 2 occurrences
* http://localhost:8080/ with 2 occurrences
* http://localhost:8080/api with 8 occurrences
* http://localhost:8080/api/ with 1 occurrences
* http://localhost:8080/api/employees with 4 occurrences
* http://localhost:8080/employees/1 with 4 occurrences
* http://localhost:8080/foo with 2 occurrences
* http://localhost:8080/my/custom/location with 2 occurrences
* http://localhost:8080/rels with 1 occurrences
* http://localhost:8080/rels/ with 6 occurrences
* http://localhost:8080/test?page=0&filter=foo,bar with 2 occurrences
* http://localhost:8080/your-app with 1 occurrences
* http://localhost:8080/your-app/people with 1 occurrences
* http://www.w3.org/2005/Atom with 1 occurrences
2019-03-21 16:32:51 +01:00
Oliver Drotbohm
75ad0988cd
#831 - Polishing.
...
Significant rework of the nullability annotation introduction to not produce any warnings anymore. Added nullability annotations where still missing. Removed the ones that were added erroneously.
Tightened nullability contracts in a couple of places, most prominently LinkRelationProvider, that now uses a LookupContext as plugin delimiter so that implementations can selectively be looked up for item or collection link relation lookup.
Removed obsolete declaration of Findbugs dependency.
2019-03-20 00:15:35 +01:00
Greg Turnquist
122391e60d
#831 - Polishing.
2019-03-11 23:23:36 -05:00
Greg Turnquist
520fdc8d91
#831 - Polishing.
2019-03-11 17:35:20 -05:00
Jens Schauder
bdd602aa74
#831 - Polishing.
...
Applied some recommendations provided by IntelliJ that I stumbled over while reviewing the changes.
2019-03-11 18:06:15 +01:00
Greg Turnquist
40250d1738
#831 - Introduce null handling.
2019-03-08 13:21:21 -06:00
Oliver Drotbohm
4b08aa783e
#850 - Polishing.
...
Moved to factory methods on PluginRegistry.
2019-03-05 14:20:07 +01:00
Oliver Drotbohm
2a2e0fb56b
#854 - Migrate off Objenesis in favor of Spring's ProxyFactory.
2019-03-05 13:16:38 +01:00
Oliver Drotbohm
b608bb0175
#728 - Make sure invocation mappings are resolved eagerly.
...
Tweaked WebFluxLinkBuilder to make sure the controller invocations are resolved eagerly as otherwise, the controller proxy created would override the invocations due to the lazy evaluation of the links and for multiple method references, only the last one would have been used.
2019-03-04 19:08:00 +01:00
Oliver Drotbohm
5c046e6858
#848 - Renamed RelProvider to LinkRelationProvider.
2019-03-04 16:39:06 +01:00
Oliver Drotbohm
37ef8e9960
#837 - Javadoc improvements.
...
Fixed @see tags pointing to URIs by wrapping the URIs in {@link …}.
2019-03-03 16:55:04 +01:00
Greg Turnquist
2f063e63c7
#845 - Polishing.
2019-03-01 09:10:59 -06:00
Oliver Drotbohm
5f772e30c5
#845 - Polished Link, UriTemplate, TemplateVariables and IanaLinkRelations.
...
Added Link.toURI() to conveniently create URIs from Link instances.
2019-03-01 15:53:45 +01:00
Oliver Drotbohm
23c0a34c66
#842 - Remove Identifiable.
2019-02-28 23:58:42 +01:00
Oliver Drotbohm
3077211db2
#844 - Moved TypeReferences to server.core package.
2019-02-28 20:29:55 +01:00
Oliver Drotbohm
ff8bc33daf
#843 - Introduced EntityLinks.link(To|For)ItemResource(Object, Function).
...
The introduced methods allow clients to pass an identifier extractor function. Also introduced a new (Extended)TypedEntityLinks that exposes the same functionality as EntityLinks but with a shared identifier extractor function so that clients don't have to provide it for each method invocation.
Prepares the fix for #842 .
2019-02-28 20:29:06 +01:00
Oliver Drotbohm
33f22e8bc9
#841 - Added builder API to HalLinkRelation.
...
This allows more convenient setup of multiple HalLinkRelation instances for the same curie.
Additional unit tests.
2019-02-28 17:23:59 +01:00
Oliver Drotbohm
81af032810
#840 - LinkDiscoverer now exposes methods to lookup required links.
...
Introduced findRequiredLinkWithRel(…) methods on LinkDiscoverer to delegate to existing lookups but resolving the Optional into an IllegalArgumentException.
Fixed JsonPathLinkDiscoverer to return no links at all if a required path segment in the payload cannot be found which would have triggered a PathNotFoundException before.
Polished parameter names and JavaDoc. Moved base test cases into the right packages.
2019-02-28 17:00:35 +01:00
Oliver Drotbohm
df4e099458
#838 - Improved registration of BeanPostProcessor implementations.
...
The BeanPostProcessor implementations in (WebMVC|WebFlux)HateoasConfiguration are now declared as static methods and their dependencies use ObjectProvider wrapper types to prevent the need to prematurely initialize the entire configuration class which triggered the creation of a lot of downstream dependencies which were then reported as ineligible for post processing themselves.
2019-02-28 15:56:08 +01:00
Oliver Drotbohm
a89e57eed7
#833 - Changed ResourceSupport class name hierarchy.
2019-02-27 20:04:15 +01:00
Oliver Drotbohm
57f36a58db
#833 - Migrate packages.
...
Changed the package structure to better reflect the different modules of the library. All client related code now lives in the client package, server related APIs in server with their respective WebMVC and WebFlux implementations in sub-packages.
Added migration script to allow users to easily migrate to the new structure and added reference documentation section on the migration.
Traversons built in defaulting to HAL HttpMessageConverters and LinkDiscoverer implementation now caused a cyclic relationship between the client and mediatype.hal packages. This has be fixed by looking up the defaults via a SpringFactories interface.
2019-02-27 12:59:58 +01:00
Greg Turnquist
cc57e2eb44
#833 - Fix each media type with a unique LinkDiscoverer bean name.
2019-02-27 12:16:55 +01:00
Oliver Drotbohm
7733f39796
#833 - Introduce SpringFactories-based SPI for custom media types.
...
We now expose a MediaTypeConfigurationProvider SPI interface that media type implementations can register an implementation class for in META-INF/spring.factories. The implementation class then has to provide a root Spring configuration class to be included into the bootstrap and expose whether it's supposed to be included for a given set of media types.
Configuration classes are supposed to implement HypermediaMappingInformation to expose either a Jackson module or code to configure the Jackson ObjectMapper to be used in the mapping infrastructure of the supported web stacks (WebMVC and WebFlux).
2019-02-27 12:16:47 +01:00
Greg Turnquist
8c366e1687
#833 - Add API to register custom media types.
2019-02-27 12:16:08 +01:00
Oliver Drotbohm
aea4c4c91f
#811 - Added ability to override single link render mode per link relation.
...
HalConfiguration now exposes a withSingleLinkRenderModeFor(…) taking a path pattern to be rendered in the also given RenderSingleLinks mode. It takes patterns as link relations are either plain strings or valid URIs.
Simplified HAL link list rendering in Jackson2HalModule avoiding double nesting of collections before rendering.
2019-02-21 16:46:53 +01:00
Oliver Drotbohm
e82d42f45a
#728 - Polishing.
2019-02-21 12:27:51 +01:00
Oliver Drotbohm
1d9703abbe
#728 - API polishing.
...
Renamed LinkBuilder implementations for the different web stacks Web(MVC|Flux)LinkBuilder for symmetry. Introduced dedicated builder types to be used from WebFluxLinkBuilder to more conveniently integrate with reactive flows (see the changes in WebFluxEmployeeController).
Deprecated ControllerLinkBuilder(Factory) in favor of WebMvcLinkBuilder(Factory).
Generally untangled the use of WebMvcLinkBuilder from the reactive examples.
2019-02-21 12:27:51 +01:00
Oliver Drotbohm
576274c1b2
#728 - Fix dependency cycles in WebFlux / WebMVC code
...
WebHandler is now independent of a particular web stack as the final LinkBuilder creation is externalized through a SAM type that client code now uses to pass a constructor. Refactored the ReactiveLinkBuilder to avoid a dependency on ControllerLinkBuilder (read: the WebMVC stack). With that change, WebHandler is now moved back to the core package.
Refactored LinkBuilderSupport to keep a UriComponentsBuilder instance around instead of UriComponents. It creates a defensive copy of the builder instance on state modifying invocations and returns a new LinkBuilderSupport instance.
Moved SpringMvcAffordanceBuilder to the core package and removed Mvc segment from its name to make obvious it's not tied to SpringMVC. Introduced TemplateVariableAwareLinkBuilderSupport as common base class between ControllerLinkBuilder and ReactiveLinkBuilder. It extracts the TemplateVariable behavior from ControllerLinkBuilder.
Extracted import of web stack specific configuration into dedicated ImportSelector and make use of String based class names to avoid cyclic dependencies between the config packages.
Removed BasicLinkBuilder.
2019-02-21 12:27:51 +01:00
Oliver Drotbohm
68c605c7ff
#728 - Polishing.
...
Adapt to API changes in master branch. Fixed formatting.
2019-02-21 12:27:51 +01:00
Greg Turnquist
3f0dcc7cb4
#728 - Add support for Spring WebFlux.
...
* Render hypermedia from WebFlux controllers.
* Support consuming hypermedia through WebClient.
* Support link creation reactively with a custom filter and explicitly with a user-provided ServerWebExchange.
* Add a ReactiveResourceAssembler and SimpleReactiveResourceAssembler.
* Upgrade to Spring Framework 5.2 to align with Spring Data Moore, removing specialized Forwarded header handling.
2019-02-21 12:27:51 +01:00
Oliver Drotbohm
544d7cd9ff
#749 - Polishing.
2019-02-20 22:55:56 +01:00
Oliver Drotbohm
112479c499
#749 - Improve performance in Link building.
...
Introduced more aggressive caching of request mappings and UriTemplates based on the contribution on 0.25.x.
2019-02-20 22:55:48 +01:00
Oliver Drotbohm
926bf55339
#825 - Polishing.
...
Added StringLinkRelation.hashCode() to be consistent with ….equals(…).
Original pull request: #826 .
2019-02-20 17:33:36 +01:00
Greg Turnquist
19036880b4
#825 - Comply with RFC8288 for LinkRelation matching.
...
Added several tests to ensure compliance with RFC8288.
Original pull request: #826 .
2019-02-20 17:33:02 +01:00
Greg Turnquist
e74d1098cc
#808 - Remove Forwarded handling.
...
In light of upgrading to Spring Framework 5.1, no longer need custom handling of Forwarded headers.
Original pull request: #818 .
2019-02-15 11:21:39 +01:00
Oliver Drotbohm
9e5db1874e
#812 - General overhaul and refactorings.
...
Cleanups in Affordance API and implementations of hypermedia type (de)serializers. Added a lot more domain methods and types to Link, ResourceSupport etc. to be able to move a lot of representation building logic into those.
AffordanceModelFactory is not a Spring Plugin anymore as that functionality is not needed currently as we statically look up all factories via the SpringFactoriesLoader mechanism.
Redesigned LinkRelation to become a first class abstraction in the codebase. IanaLinkRelations is now a collection of constants. Link now keeps a LinkRelation instance around instead of a plain String.
Tweaked LinkDiscoverer API to return Optional and Links instead of nullable Link and List<Link>.
Tweaked API of CurieProvider to make use of the newly introduced HalLinkRelation based on the general LinkRelation.
Additional fixes for the Kotlin extension functions. Make Kotlin build setup compile with JDK 8. Removed Objects helper class in favor of Spring's already existing Assert and it's usage in ResourceAssemblerSupport.
2019-02-15 10:57:23 +01:00
Oliver Drotbohm
38b98af786
#819 - Polishing.
...
Original pull request: #820 .
2019-02-15 10:53:20 +01:00
Greg Turnquist
14f0012aef
#819 - Migrate off deprecated OrderAwarePluginRegistry APIs.
...
Original pull request: #820 .
2019-02-15 10:52:50 +01:00
Oliver Drotbohm
f830d3d641
#806 - Polishing.
2019-02-11 14:57:31 +01:00
Oliver Drotbohm
aca2cc578a
#806 - Fixed package cycle between hateoas and hateoas.core packages.
...
Moved AffordanceModelFactory to the library's root package. Moved Kotlin extensions to hateoas.mvc package.
Added an ArchUnit based test for package cycles.
2019-02-11 14:57:25 +01:00