Skip to content

Commit f43ba9a

Browse files
authored
RESTHeart 8.0 (the-benchmarker#7471)
* ⬆️ Upgrade RESTHeart to v8.0.0-beta * ⬆️ Upgrade RESTHeart to v8.0.x * 🔧 Update version in config.yaml * ♻️ Exclude graalvm transitive dependencies in shaded jar using shade plugin configuration
1 parent daf666e commit f43ba9a

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

java/restheart/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
framework:
22
website: restheart.org
3-
version: 8.0.0-beta
3+
version: 8.0
44

55
build:
66
- mvn package

java/restheart/etc/conf-overrides.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
/core/name: restheart-benchmarker
77

8-
/fullAuthorizer/enabled: true
9-
108
/logging/log-level: "OFF"
119
/logging/requests-log-mode: 0
1210

11+
/fullAuthorizer/enabled: true
12+
1313
/ping/enabled: false
14+
/xPoweredBy/enabled: false
15+
/dateHeader/enabled: false

java/restheart/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<properties>
1010
<maven.compiler.source>21</maven.compiler.source>
1111
<maven.compiler.target>21</maven.compiler.target>
12-
<restheart.version>8.0.0-beta</restheart.version>
12+
<restheart.version>[8.0,8.1.0-SNAPSHOT)</restheart.version>
1313
</properties>
1414

1515
<dependencies>
@@ -37,6 +37,12 @@
3737
</excludes>
3838
</filter>
3939
</filters>
40+
<!-- avoids including graalvm transitive dependencies into shaded jar-->
41+
<artifactSet>
42+
<excludes>
43+
<exclude>org.graalvm.*:*</exclude>
44+
</excludes>
45+
</artifactSet>
4046
</configuration>
4147
<executions>
4248
<execution>

java/restheart/src/main/java/org/restheart/RootService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
import org.restheart.exchange.ByteArrayRequest;
44
import org.restheart.exchange.ByteArrayResponse;
55
import org.restheart.plugins.ByteArrayService;
6+
import static org.restheart.plugins.InterceptPoint.ANY;
67
import org.restheart.plugins.RegisterPlugin;
78
import org.restheart.plugins.RegisterPlugin.MATCH_POLICY;
8-
import static org.restheart.plugins.InterceptPoint.*;
99

1010
@RegisterPlugin(name = "benchmarkRootService",
1111
description = "service for root resource",
1212
defaultURI = "/",
1313
uriMatchPolicy = MATCH_POLICY.EXACT,
1414
blocking = false,
15-
dontIntercept = { REQUEST_BEFORE_EXCHANGE_INIT, REQUEST_BEFORE_AUTH, REQUEST_AFTER_AUTH, RESPONSE, RESPONSE_ASYNC })
15+
dontIntercept = ANY)
1616
public class RootService implements ByteArrayService {
1717
@Override
1818
public void handle(ByteArrayRequest request, ByteArrayResponse response) throws Exception {

java/restheart/src/main/java/org/restheart/UserService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,23 @@
88
import org.restheart.exchange.ByteArrayRequest;
99
import org.restheart.exchange.ByteArrayResponse;
1010
import org.restheart.plugins.ByteArrayService;
11-
import static org.restheart.plugins.InterceptPoint.*;
11+
import static org.restheart.plugins.InterceptPoint.ANY;
1212
import org.restheart.plugins.RegisterPlugin;
1313
import org.restheart.utils.HttpStatus;
1414

1515
@RegisterPlugin(name = "benchmarkUserService",
1616
description = "service for user resource",
1717
defaultURI = "/user",
1818
blocking = false,
19-
dontIntercept = { REQUEST_BEFORE_EXCHANGE_INIT, REQUEST_BEFORE_AUTH, REQUEST_AFTER_AUTH, RESPONSE, RESPONSE_ASYNC }
19+
dontIntercept = ANY
2020
)
2121
public class UserService implements ByteArrayService {
2222
@Override
2323
public void handle(ByteArrayRequest request, ByteArrayResponse response) throws Exception {
2424
switch(request.getMethod()) {
2525
case POST -> { /* nothing to do! this just sends 200 back */ }
2626
case GET -> response.setContent(request.getPathParam("/user/{id}", "id"));
27+
case OPTIONS -> handleOptions();
2728
default -> response.setStatusCode(HttpStatus.SC_NOT_IMPLEMENTED);
2829
}
2930
}

0 commit comments

Comments
 (0)