Merge branch 'guice-fix' into 'main'

Fixed httpclient implementation in guice

See merge request cse1105/2025-2026/teams/csep-team-76!71
This commit is contained in:
Oskar Rasieński 2026-01-18 16:22:01 +01:00
commit 5388c52aaa

View file

@ -52,7 +52,7 @@ public class MyModule implements Module {
binder.bind(WebSocketUtils.class).in(Scopes.SINGLETON); binder.bind(WebSocketUtils.class).in(Scopes.SINGLETON);
binder.bind(NutritionDetailsCtrl.class).in(Scopes.SINGLETON); binder.bind(NutritionDetailsCtrl.class).in(Scopes.SINGLETON);
binder.bind(NutritionViewCtrl.class).in(Scopes.SINGLETON); binder.bind(NutritionViewCtrl.class).in(Scopes.SINGLETON);
binder.bind(HttpClient.class).in(Scopes.SINGLETON); binder.bind(HttpClient.class).toInstance(HttpClient.newHttpClient());
binder.bind(ConfigService.class).toInstance(new ConfigService(Path.of("config.json"))); binder.bind(ConfigService.class).toInstance(new ConfigService(Path.of("config.json")));
binder.bind(new TypeLiteral<WebSocketDataService<Long, Recipe>>() {}).toInstance( binder.bind(new TypeLiteral<WebSocketDataService<Long, Recipe>>() {}).toInstance(
new WebSocketDataService<>() new WebSocketDataService<>()