File tree Expand file tree Collapse file tree 7 files changed +26
-21
lines changed Expand file tree Collapse file tree 7 files changed +26
-21
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ COPY test-account-activation.html /config/mail/account-activation.html
88COPY test-password-reset.html /config/mail/password-reset.html
99COPY test-welcome-to-faf.html /config/mail/welcome-to-faf.html
1010ENV FAF_DOMAIN=faforever.com
11+ ENV CHALLONGE_KEY=test
1112RUN java -Djarmode=tools -jar application.jar extract
1213RUN java -Dspring.context.exit=onRefresh -Dspring.profiles.active=training -XX:ArchiveClassesAtExit=application.jsa -jar application/application.jar
1314
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ buildscript {
1212plugins {
1313 id " java"
1414 id " org.springframework.boot" version " 3.3.1"
15+ id " org.springframework.boot.aot" version " 3.3.1"
1516 id " idea"
1617 id " com.adarshr.test-logger" version " 4.0.0"
1718}
@@ -31,7 +32,10 @@ repositories {
3132 maven { url " https://jitpack.io" }
3233}
3334
34- compileJava. dependsOn(processResources)
35+ compileJava {
36+ dependsOn(processResources)
37+ options. compilerArgs. add(" -parameters" )
38+ }
3539
3640configurations {
3741 compile. exclude module : " assertj-core"
@@ -126,6 +130,15 @@ test {
126130 }
127131}
128132
133+ processAot {
134+ environment(" FAF_DOMAIN" , " faforever.com" )
135+ environment(" API_PROFILE" , " " )
136+ }
137+
138+ processTestAot {
139+ enabled = false
140+ }
141+
129142ext {
130143
131144}
Original file line number Diff line number Diff line change 22
33import com .faforever .api .config .FafApiProperties ;
44import com .faforever .api .config .FafApiProperties .Challonge ;
5+ import jakarta .servlet .http .HttpServletRequest ;
56import lombok .RequiredArgsConstructor ;
67import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
78import org .springframework .boot .web .client .RestTemplateBuilder ;
89import org .springframework .cache .annotation .Cacheable ;
9- import org .springframework .context .annotation .Scope ;
10- import org .springframework .context .annotation .ScopedProxyMode ;
1110import org .springframework .http .HttpEntity ;
1211import org .springframework .http .HttpMethod ;
1312import org .springframework .http .MediaType ;
2221import org .springframework .web .util .DefaultUriBuilderFactory ;
2322import org .springframework .web .util .UriBuilder ;
2423
25- import jakarta .servlet .http .HttpServletRequest ;
2624import java .util .Map ;
2725import java .util .concurrent .CompletableFuture ;
2826
3735 * only loaded if a Challonge API key is specified.</p>
3836 */
3937@ RestController
40- @ Scope (proxyMode = ScopedProxyMode .TARGET_CLASS )
4138@ RequestMapping (path = ChallongeController .CHALLONGE_ROUTE )
4239@ ConditionalOnProperty ("faf-api.challonge.key" )
4340public class ChallongeController {
Original file line number Diff line number Diff line change 11package com .faforever .api .config ;
22
33import com .faforever .api .i18n .RepositoryMessageSource ;
4- import org .springframework .context .HierarchicalMessageSource ;
5- import org .springframework .context .MessageSource ;
64import org .springframework .context .annotation .Bean ;
75import org .springframework .context .annotation .Configuration ;
86import org .springframework .context .support .MessageSourceAccessor ;
97
10- import jakarta .inject .Inject ;
11-
128@ Configuration
139public class LocalizationConfig {
1410
1511 @ Bean
16- public MessageSourceAccessor messageSourceAccessor (MessageSource messageSource ) {
12+ public MessageSourceAccessor messageSourceAccessor (RepositoryMessageSource messageSource ) {
1713 return new MessageSourceAccessor (messageSource );
1814 }
19-
20- @ Inject
21- public void configureMessageSource (HierarchicalMessageSource messageSource , RepositoryMessageSource repositoryMessageSource ) {
22- messageSource .setParentMessageSource (repositoryMessageSource );
23- }
2415}
Original file line number Diff line number Diff line change 1818import com .yahoo .elide .jsonapi .JsonApiSettings ;
1919import org .apache .commons .beanutils .ConvertUtils ;
2020import org .apache .commons .beanutils .Converter ;
21+ import org .springframework .beans .factory .annotation .Qualifier ;
2122import org .springframework .beans .factory .config .AutowireCapableBeanFactory ;
2223import org .springframework .context .annotation .Bean ;
2324import org .springframework .context .annotation .Configuration ;
@@ -35,8 +36,8 @@ public class ElideConfig {
3536
3637 @ Bean
3738 MultiplexManager multiplexDataStore (
38- DataStore fafDataStore ,
39- DataStore leagueDataStore
39+ @ Qualifier ( "fafDataStore" ) DataStore fafDataStore ,
40+ @ Qualifier ( "leagueDataStore" ) DataStore leagueDataStore
4041 ) {
4142 return new MultiplexManager (fafDataStore , leagueDataStore );
4243 }
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ spring:
7171 rabbitmq :
7272 host : ${RABBIT_HOST:127.0.0.1}
7373 port : ${RABBIT_PORT:5672}
74- username : ${RABBIT_USERNAME:faf-java- api}
74+ username : ${RABBIT_USERNAME:faf-api}
7575 password : ${RABBIT_PASSWORD:banana}
7676 virtual-host : ${RABBIT_VHOST:/faf-core}
7777 jpa :
@@ -80,8 +80,8 @@ spring:
8080 oauth2 :
8181 resourceserver :
8282 jwt :
83- jwk-set-uri : https ://hydra.faforever.com /.well-known/jwks.json
84- issuer-uri : https ://hydra.faforever.com /
83+ jwk-set-uri : http ://localhost:4444 /.well-known/jwks.json
84+ issuer-uri : http ://ory- hydra:4444 /
8585logging :
8686 level :
87- com.faforever.api : debug
87+ com.faforever.api : debug
Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ spring:
148148 resourceserver :
149149 jwt :
150150 issuer-uri : ${JWT_FAF_HYDRA_ISSUER:https://hydra.${FAF_DOMAIN}/}
151+ aot :
152+ enabled : true
151153
152154server :
153155 # Mind that this is configured in the docker compose file as well (that is, in the gradle script that generates it)
You can’t perform that action at this time.
0 commit comments