1069 Commits

Author SHA1 Message Date
Oliver Drotbohm
7b5008a3fe #1838 - Continue development on 1.4.6-SNAPSHOT. 2022-09-15 11:06:26 +02:00
Oliver Drotbohm
3e80ca491d #1838 - Releasing Spring HATEOAS 1.4.5. 2022-09-15 11:06:24 +02:00
Oliver Drotbohm
0299b89480 #1838 - Update changelog. 2022-09-15 11:05:23 +02:00
Oliver Drotbohm
4d9eb777d3 #1837 - Upgrade to Spring Framework 5.3.23. 2022-09-15 10:58:51 +02:00
Oliver Drotbohm
d2f6873220 #1836 - Upgrade to Lombok 1.18.24. 2022-09-15 10:30:42 +02:00
Oliver Drotbohm
b28b8dc707 #1835 - Upgrade to Jackson 2.13.4. 2022-09-15 09:57:51 +02:00
Oliver Drotbohm
d9704d9022 #1834 - Upgrade to Logback 1.2.11. 2022-09-15 09:53:09 +02:00
Oliver Drotbohm
6fb8d5128c #1833 - Upgrade to Slf4j 1.7.36. 2022-09-15 09:39:54 +02:00
Oliver Drotbohm
cdad40250c #1832 - Upgrade to Reactor 2020.0.23. 2022-09-15 09:36:22 +02:00
Oliver Drotbohm
f49758aa00 #1831 - Reset dummy invocation cache on request completion. 2022-09-15 09:24:17 +02:00
Oliver Drotbohm
e75afe5603 #1803 - Continue development on 1.4.5-SNAPSHOT. 2022-06-20 10:12:24 +02:00
Oliver Drotbohm
37927b2fd2 #1803 - Releasing Spring HATEOAS 1.4.4. 2022-06-20 10:12:23 +02:00
Oliver Drotbohm
dd5d65ca40 #1803 - Update changelog. 2022-06-20 10:10:56 +02:00
Oliver Drotbohm
8169fe92cb #1802 - Allow dots in template variable names. 2022-06-18 19:13:28 +02:00
Oliver Drotbohm
5d3136060d #1782 - Re-upgrade to Reactor snapshots for spring-next profile. 2022-06-09 09:09:27 +02:00
Oliver Drotbohm
2b577e66a3 #1798 - Polishing.
Avoid grouping of template variables via stream.

Before:

Benchmark                          Mode  Cnt      Score      Error  Units
TemplateVariableBenchmark.concat  thrpt    3  55275,436 ± 3778,690  ops/s

After:

Benchmark                          Mode  Cnt      Score     Error  Units
TemplateVariableBenchmark.concat  thrpt    3  64587,790 ± 735,705  ops/s
2022-06-01 17:57:03 +02:00
Michael.Rocke
fd7dc6f6b1 #1798 - Optimization around constructing UriTemplate when supplying TemplateVariables of same type
Reduce the repeated merge routines on ExpandGroups.

Before:
Benchmark                          Mode  Cnt     Score     Error  Units
TemplateVariableBenchmark.concat  thrpt    3  3150,261 ± 263,525  ops/s

After:
Benchmark                          Mode  Cnt      Score      Error  Units
TemplateVariableBenchmark.concat  thrpt    3  55275,436 ± 3778,690  ops/s
2022-06-01 17:57:02 +02:00
Oliver Drotbohm
29c8d9b9c1 #1784 - Downgrade to Reactor 2020.0.19 for spring-next build profile.
2020.0.20 snapshots seem to be incompatible with Spring Framework 5.3.21 snapshots:

2022-05-30 18:59:55,051 ERROR        reactor.core.scheduler.Schedulers: 315 - Scheduler worker in group main failed with an uncaught exception
java.lang.NoSuchMethodError: 'reactor.core.publisher.Sinks$RootSpec reactor.core.publisher.Sinks.unsafe()'
	at org.springframework.test.web.reactive.server.HttpHandlerConnector.doConnect(HttpHandlerConnector.java:87)
	at org.springframework.test.web.reactive.server.HttpHandlerConnector.lambda$connect$0(HttpHandlerConnector.java:79)
	at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:44)
	at reactor.core.publisher.Mono.subscribe(Mono.java:4400)
	at reactor.core.publisher.MonoSubscribeOn$SubscribeOnSubscriber.run(MonoSubscribeOn.java:126)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84)
	at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
2022-05-31 08:28:27 +02:00
Oliver Drotbohm
382002e855 #1795 - Fix handling of {*…} pattern variables in URI mappings.
We now properly handle path segment capture variables in URI mappings. Values handed into the dummy method invocations are expanded properly and a given null results in the composite segment template variable {/…*} being rendered to advertise the ability to add further segments.
2022-05-30 20:58:29 +02:00
Oliver Drotbohm
c8a63709f2 #1792 - Fix double encoding of request parameters in LinkBuilderSupport.toUri(…).
We unfortunately cannot use UriComponentsBuilder in a way that we can populate it with encoded parameters *and* expand encoded path variable values. We currently use ….buildAndExpand(…) which considers the values provided unencoded but we never actually call ….toUri() on the resulting UriComponents instance.

We unfortunately cannot fix the problem at its root, as the only alternative would be to call ….build(true) indicating values already encoded but that stumbles above the template variables still present in the original template.

The only workaround right now is never calling UriComponents.toUri() but ….toUriString() as that doesn't apply the pending encoding that's not actually needed as we start with fully encoded values in the first place.
2022-05-16 10:11:15 +02:00
Oliver Drotbohm
d8579f5509 #1722 - Original test case. 2022-05-16 10:05:27 +02:00
Oliver Drotbohm
c1027088b7 #1785 - Continue development on 1.4.4-SNAPSHOT. 2022-05-12 08:46:30 +02:00
Oliver Drotbohm
167e9ad251 #1785 - Releasing Spring HATEOAS 1.4.3. 2022-05-12 08:46:24 +02:00
Oliver Drotbohm
414d7095ea #1785 - Update changelog. 2022-05-12 08:43:22 +02:00
Oliver Drotbohm
577c57472d #1784 - Upgrade to Reactor 2020.0.19. 2022-05-11 16:53:13 +02:00
Oliver Drotbohm
1d45b3980e #1783 - Upgrade to Spring Framework 5.3.20. 2022-05-11 16:53:13 +02:00
Réda Housni Alaoui
40f74dd1e7 #1780 - Do not expose URL template variable for MultipartFile parameter. 2022-05-10 15:20:13 +02:00
Oliver Drotbohm
faf1c3af36 #1767 - Continue development on 1.4.3-SNAPSHOT. 2022-04-19 10:36:29 +02:00
Oliver Drotbohm
886a8f3093 #1767 - Releasing Spring HATEOAS 1.4.2. 2022-04-19 10:36:24 +02:00
Oliver Drotbohm
a84fe38a2f #1767 - Prepare changelog for 1.4.2 release. 2022-04-19 10:35:59 +02:00
Oliver Drotbohm
da4cde5e5e #1774 - Upgrade to Jackson 2.13.2.1. 2022-04-19 10:32:56 +02:00
Oliver Drotbohm
6b156feacf #1769 - Upgrade to Reactor 2020.0.18. 2022-04-19 09:59:51 +02:00
Oliver Drotbohm
b1dd51a028 #1768 - Upgrade to Spring Framework 5.3.19. 2022-04-19 09:58:27 +02:00
Oliver Drotbohm
0558bd0cd2 #1766 - Performance tweaks in TemplateVariable.toString(…).
Heavily inspired by the PR @MikeRocke, we removed all usage of String.format(…) from hot code paths triggered by ….toString() as it's used in general output a lot.

Before:

Benchmark                                    Mode  Cnt         Score        Error  Units
TemplateVariableBenchmark.toString(…)       thrpt    3   2803239,270 ± 110258,955  ops/s

After:

Benchmark                                    Mode  Cnt         Score        Error  Units
TemplateVariableBenchmark.toString(…)       thrpt    3  10753653,459 ± 156684,459  ops/s
2022-04-14 14:46:44 +02:00
Oliver Drotbohm
afb87f83b8 #1747 - Update copyright years to 2022. 2022-02-07 10:36:22 +01:00
Oliver Drotbohm
5403fa5b9d #1747 - Continue development on 1.4.2-SNAPSHOT. 2022-01-14 09:38:57 +01:00
Oliver Drotbohm
39d121e74c #1747 - Releasing Spring HATEOAS 1.4.1. 2022-01-14 09:38:55 +01:00
Oliver Drotbohm
cb3656cdfb #1747 - Prepare changelog. 2022-01-14 09:37:41 +01:00
Oliver Drotbohm
ee2f35048c #1746 - Upgrade to Jackson 2.13.1. 2022-01-14 09:33:26 +01:00
Oliver Drotbohm
3c89f8dd6c #1745 - Upgrade to Reactor 2020.0.15. 2022-01-14 09:08:55 +01:00
Oliver Drotbohm
364f7226dc #1744 - Upgrade to Spring Framework 5.3.15. 2022-01-14 08:54:44 +01:00
Oliver Drotbohm
75bb8f4dac #1731 - Prevent premature base encoding in UriTemplate if host is templated. 2021-12-10 11:02:57 +01:00
Oliver Drotbohm
705260d128 #1730 - Polishing. 2021-12-10 11:02:38 +01:00
Oliver Drotbohm
3b47c13f2d #1730 - Added equals(…) and hashCode() methods to TypeBasedPayloadMetadata. 2021-12-10 11:02:38 +01:00
Oliver Drotbohm
7f93694c69 #1723 - Fix performance degradations introduced by #467.
The commits for #467 significantly degraded performance as CachingMappingDiscoverer.getParams(Method) doesn't properly cache the result of the call which causes quite expensive, unnecessarily repeated annotation lookups for the very same method. We also avoid the creation of an Optional instance for the sole purpose of a simple null check.

Introduce FormatterFactory to potentially cache the to-String formatting functions and thus avoid repeated evaluation and Function object creation.

We now also avoid the creation of ParamRequestCondition instances if no @RequestParams(params = …) values could be found in the first place.
2021-11-23 23:25:54 +01:00
Oliver Drotbohm
db46db5c6f #1723 - Fix potential resource leak in DummyInvocationUtils.
We now constrain the cache of controller proxy instances to 256 elements using Spring's ConcurrentLruCache to avoid instances created via DummyInvocationUtils.methodOn(Class<?>, Object…). The parameters are part of the cache key and used to expand the type-level mappings. If those vary for each call and a request creates a lot of links (>100000) the memory consumption grows significantly, first and foremost indefinitely.

Using the ThreadLocal will still make sure that the cache is local to a current request, so the proxies can actually be reused as the method invocations used to record the mappings would interfere for concurrent requests otherwise.

Removed obsolete generic parameter on the CacheKey type.
2021-11-23 23:25:53 +01:00
Oliver Drotbohm
c4b4e6d405 #1714 - Continue development on 1.4.1-SNAPSHOT. 2021-11-23 23:22:19 +01:00
Oliver Drotbohm
9646ab6790 #1714 - Releasing Spring HATEOAS 1.4.0. 2021-11-11 15:24:59 +01:00
Oliver Drotbohm
7b46211790 #1714 - Update change log prior to release. 2021-11-11 15:24:20 +01:00
Oliver Drotbohm
cea7b3ac26 #1716 - Upgrade to Spring Framework 5.3.13. 2021-11-11 15:19:56 +01:00