Commit Graph

817 Commits

Author SHA1 Message Date
Oliver Drotbohm
a5ccafc4da #1334 - Upgrade to Reactor Dysprosium SR10. 2020-07-27 18:43:03 +02:00
Oliver Drotbohm
68e750119f #1333 - Upgrade to Spring 5.2.8. 2020-07-27 18:42:05 +02:00
Oliver Drotbohm
646e73c8c5 #1329 - Removed APIs deprecated in 1.0.
* ControllerLinkBuilder(Factory)
* IanaRels
2020-07-27 18:23:06 +02:00
Oliver Drotbohm
5ea48dd332 #361 - Rearrange PropertyResolvingMappingDiscoverer.
Moved PropertyResolvingMappingDiscoverer into server.core package. Unified MappingDiscoverer arrangement in WebHandler and use it from there. Deprecated AnnotationBasedMappingDiscoverer to be able to make it package protected in 1.3.
2020-07-27 18:16:46 +02:00
Oliver Drotbohm
ffa1dc3539 #361 - Polishing.
Made implementation class package protected to not expose it. Avoid the use of Optional for hot code paths. Removed factory method as we only use the type internally anyway.

Removed test customizations as the discoverer is now just leniently opting out if not ApplicationContext can be found.

Original pull request: #1328.
2020-07-27 17:50:25 +02:00
Michele
c5f4bfa0b5 #361 - Implemented property resolving in link creation.
We now pipe the detected mapping through the PropertyResolver exposed by the ApplicationContext's Environment.

Original pull request: #1328.
2020-07-27 17:50:25 +02:00
Oliver Drotbohm
3a7798a912 #1291 - Polishing. 2020-07-27 13:06:24 +02:00
Greg Turnquist
5f625ede2d #1291 - Support alphanumeric logref for VndError.
According to https://github.com/blongden/vnd.error, logref is for "expressing a (numeric/alpha/alphanumeric) identifier". This patches `VndError` to support both strings and integers, ensuring each serializes properly.

NOTE: `VndErrors` has been deprecated due to the spec itself being dead since 2014. However, it must be supported until fully removed from Spring HATEOAS.

Original pull request: #1293.
2020-07-27 13:06:24 +02:00
Oliver Drotbohm
43528523eb #1314 - Polishing. 2020-07-24 08:48:32 +02:00
Oliver Drotbohm
2504ae3fac #1314 - HalLinkRelations now properly parses link relations with more than one colon.
Previously the parsing of link relations had assumed that a curie relation only consists of a single colon, thus, that a split by colon would always end up in two elements and only re-assembled these two elements. In case a URI that contains multiple colons handed into the parsing method, further segments had been dropped. We now remain everything following the first colon as local part of the URI.

Also, we now detect IANA registered URI schemes [0] and consider source relations starting with those as uncuried ones.

[0] https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
2020-07-24 08:46:28 +02:00
Oliver Drotbohm
f23f2399a3 #1287 - Polishing. 2020-07-23 22:50:32 +02:00
Oliver Drotbohm
348d6e4514 #1287 - Remove cache from UriTemplate in favor of better handling in Link.
We now avoid creating the UriTemplate instance for a Link if the Link does not contain curly braces in the first place. That allows us to remove the cache within UriTemplate in the first place.
2020-07-23 22:50:15 +02:00
Jay Bryant
65a692e33d #1319 - Language improvements in reference documentation. 2020-07-23 09:33:07 +02:00
vachillo
f1407b253e #1320 - Update Javadoc and toString() methods in renamed representation model classes. 2020-07-23 09:29:53 +02:00
Oliver Drotbohm
200ef443de #1323 - Polishing. 2020-07-23 09:27:27 +02:00
Oliver Drotbohm
e05d904fe1 #1323 - HalModelBuilder.build() now picks up call side generics. 2020-07-23 09:27:09 +02:00
Oliver Drotbohm
b560e5228a #1287 - Fixed potential memory leak when creating many links.
We now use a copy of Spring Framework's MimeTypeUtil's ConcurrentLruCache implementation to strictly only LRU cache 1024 instances of UriTemplate and fall back to creation if that size is exceeded.

This should solve the memory leak for now but should still be revisited across the Spring ecosystem.
2020-07-22 23:32:42 +02:00
Oliver Drotbohm
8af6b4c099 #1322 - Added Links.and(boolean, Supplier<Link>) to conditionally add links. 2020-07-19 18:32:31 +02:00
Oliver Drotbohm
d64d3d308c #1321 - Introduced MvcLink to ease Link creation from MvcUriComponentsBuilders.
We now ease Link creation from MvcUriComponentsBuilder controller method references via MvcLink.of(…).
2020-07-19 18:25:59 +02:00
Greg L. Turnquist
887b93aaba #1294 - Polishing. 2020-07-01 09:48:04 -05:00
Greg L. Turnquist
5972fd3f35 #1294 - Delombok production code.
Production code will no longer use Lombok. It's confined to test scope.
2020-07-01 09:47:59 -05:00
Greg L. Turnquist
153caeab18 #1313 - Polishing. 2020-06-26 11:17:44 -05:00
Greg L. Turnquist
27fe7de1c9 #1313 - Override Problem.withStatus in ExtendedProblem to preserve payload.
When you use the withStatus() method on an ExtendedProblem, it hands back a Problem, which drops the payload. This commit adds the same sort of override already provided for the other attributes in ExtendedProblem.
2020-06-26 11:17:36 -05:00
Greg Turnquist
f3198b7d79 #1292 - Continue development on 1.2.0-SNAPSHOT. 2020-05-11 16:07:47 -05:00
Greg Turnquist
701f7a1a1b #1292 - Releasing Spring HATEOAS 1.1.0.RELEASE. 2020-05-11 16:07:41 -05:00
Greg Turnquist
f92f965d5a #1292 - Update changelog.txt. 2020-05-11 16:06:21 -05:00
Oliver Drotbohm
5d1136ee12 #968 - Polishing.
Original pull request: #1269.
2020-05-07 22:19:28 +02:00
Réda Housni Alaoui
08c5f564b3 #968 - Consider @JsonUnwrapped properties with (embedded) CollectionModel and HAL Forms.
Original pull request: #1269.
2020-05-07 22:19:01 +02:00
Oliver Drotbohm
b865ad403b #864 - Polishing.
Consistently use javascript instead of json for JSON code blocks in the reference documentation.
2020-05-07 21:48:16 +02:00
Oliver Drotbohm
2cab91a332 #864 - Introduced HalModelBuilder.
HalModelBuilder expose HAL-idiomatic API to set up representations. That includes embeds, previews and syntactic sugar around the inclusion of potentially empty collections as embeds.

Related tickets: #175, #193, #270, #920.
Original pull request: #1273.
2020-05-07 21:32:57 +02:00
Oliver Drotbohm
36ddb281f9 #1280 - Fix in invocation of generic RepresentationModelProcessor. 2020-04-29 17:04:44 +02:00
Oliver Drotbohm
6b8e30eeb0 #1278 - Continue development on 1.1.0.BUILD-SNAPSHOT. 2020-04-28 13:36:19 +02:00
Oliver Drotbohm
b36fb546b0 #1278 - Releasing Spring HATEOAS 1.1.0.RC1. 2020-04-28 13:36:17 +02:00
Oliver Drotbohm
f8b4e07b9b #1278 - Update changelog. 2020-04-28 13:35:03 +02:00
Oliver Drotbohm
312454815c #1278 - Dependency upgrades. 2020-04-28 13:29:21 +02:00
Greg Turnquist
0fcdea7e1b #1277 - Upgrade to Jackson 2.11.0. 2020-04-27 09:07:28 -05:00
Greg Turnquist
24a005abde #1275 - Align with Spring Framework naming convention for Kotlin co-routines.
* Deprecated existing `toCollectionModel` extension function using Kotlin's @Deprecated providing maximum ease for developers to migrate to new API.
* Added functions that create a full complement between ReactiveRepresentationModelAssemblerBuildDsl and SimpleReactiveRepresentationModelAssemblerBuildDsl on both `toModelAndAwait` and `toCollectionModelAndAwait`.

Related issue: #1213.
2020-04-22 13:20:37 -05:00
Greg Turnquist
90377a6e8d #227 - Verify UriTemplate reports variable parameter as "templated".
Resolved in a previous commit, this simply adds a test case verifying the regression doesn't happen.
2020-04-15 14:15:34 -05:00
Patrick ALLAIN
8995ba804a #1270 - Add Kotlin source to released artifacts.
Original pull request: #1271.
2020-04-14 11:19:39 -05:00
Greg Turnquist
c388a85b59 #1266 - Use JDK 14 for Java.NEXT CI testing. 2020-04-09 13:01:09 -05:00
Oliver Drotbohm
2973628c92 #1264 - Remove .factorypath. 2020-04-09 13:19:47 +02:00
Oliver Drotbohm
1ef3f53f1b #1247 - Upgrade to Spring Docs resources 0.2.1.
For improved content width.
2020-04-09 13:05:00 +02:00
Jay Bryant
e4fc1053a8 #1247 - Update spring-doc-resources and syntax highlighting for ref docs.
Update spring-doc-resources to get the latest look and feel and nicer code listings.
2020-04-07 11:54:53 -05:00
Greg Turnquist
b3697bf270 #1250 - Start testing against Jackson 2.11.
Related pull request: #1257.
2020-04-07 11:51:52 -05:00
Greg Turnquist
b46082b1b0 #1213 - Add support for Kotlin co-routines.
The ReactiveRepresentationModelAssembler and SimpleRepresentationModelAssembler both accept Flux inputs for entities. This change adds support for Kotlin co-routines to the same inputs.

Related pull request: #1258.
2020-04-07 11:50:20 -05:00
Oliver Drotbohm
1f8c0a4230 #1252 - Polishing.
We now make sure that BeanPostProcessors that are exposed consume their dependencies via ObjectFactory instances to avoid the need to prematurely trigger bean instantiation in the BeanPostProcessor detection phase. Marked the direct dependencies of the post processors as lazy, as the post processor only do actual work if beans of a particular type are available in the ApplicationContext. In case they aren't we don't even need to instantiate the downstream dependencies of the processors.

Avoid proxying of configuration classes where possible.

Related pull request: #1251.
2020-04-03 18:26:09 +02:00
Greg Turnquist
de38b9e200 #1252 - Make sure HypermediaWebTestClientConfigurer is only included with spring-test on the classpath.
HypermediaConfigurationImportSelector is now ResourceLoaderAware to make sure it uses the class loader used to bootstrap the application context. This is important for both testing as well as custom classloader arrangements like Boot's DevTools. We now only include WebTestHateoasConfiguration if WebTestClient is on the classpath.

The configuration class has been extracted to not leak references to code tied to spring-test into production deployments. Added test cases to check both the inclusion and exclusion of the configuration classes based on the classpath arrangement.

Original pull request: #1251.
2020-04-03 17:48:29 +02:00
Greg Turnquist
599a366c85 #1225 - Polishing. 2020-04-02 12:20:52 -05:00
Greg Turnquist
6a6cd31113 #1223 - Polishing. 2020-04-02 12:17:26 -05:00
Greg Turnquist
fae4cf0e68 #1224 - Polishing. 2020-04-02 12:15:44 -05:00