Skip to content

Commit 22d9941

Browse files
author
Psilo
committed
use lombok setter too
1 parent e659d95 commit 22d9941

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main/java/info/unterrainer/commons/httpserver/HttpServer.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import io.javalin.http.HandlerType;
4040
import lombok.Builder;
4141
import lombok.Getter;
42+
import lombok.Setter;
4243
import lombok.extern.slf4j.Slf4j;
4344
import ma.glasnost.orika.MapperFactory;
4445
import ma.glasnost.orika.impl.DefaultMapperFactory;
@@ -57,6 +58,7 @@ public class HttpServer {
5758
ExecutorService executorService;
5859
List<String> appVersionFqns;
5960
@Getter
61+
@Setter
6062
private Consumer<UserDataJson> userAccessInterceptor;
6163

6264
private HttpServer() {
@@ -172,11 +174,6 @@ public void start() {
172174
javalin.addHandler(hi.handlerType(), hi.path(), hi.handler(), hi.roles());
173175
}
174176

175-
public HttpServer setUserAccessInterceptor(final Consumer<UserDataJson> userAccessInterceptor) {
176-
this.userAccessInterceptor = userAccessInterceptor;
177-
return this;
178-
}
179-
180177
public HttpServer get(final String path, final Handler handler, final Role... roles) {
181178
handlerInstances.add(HandlerInstance.builder()
182179
.path(path)

0 commit comments

Comments
 (0)