File tree Expand file tree Collapse file tree 7 files changed +22
-21
lines changed Expand file tree Collapse file tree 7 files changed +22
-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
8
8
COPY test-password-reset.html /config/mail/password-reset.html
9
9
COPY test-welcome-to-faf.html /config/mail/welcome-to-faf.html
10
10
ENV FAF_DOMAIN=faforever.com
11
+ ENV CHALLONGE_KEY=test
11
12
RUN java -Djarmode=tools -jar application.jar extract
12
13
RUN java -Dspring.context.exit=onRefresh -Dspring.profiles.active=training -XX:ArchiveClassesAtExit=application.jsa -jar application/application.jar
13
14
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ buildscript {
12
12
plugins {
13
13
id " java"
14
14
id " org.springframework.boot" version " 3.3.1"
15
+ id " org.springframework.boot.aot" version " 3.3.1"
15
16
id " idea"
16
17
id " com.adarshr.test-logger" version " 4.0.0"
17
18
}
@@ -31,7 +32,10 @@ repositories {
31
32
maven { url " https://jitpack.io" }
32
33
}
33
34
34
- compileJava. dependsOn(processResources)
35
+ compileJava {
36
+ dependsOn(processResources)
37
+ options. compilerArgs. add(" -parameters" )
38
+ }
35
39
36
40
configurations {
37
41
compile. exclude module : " assertj-core"
@@ -126,6 +130,11 @@ test {
126
130
}
127
131
}
128
132
133
+ processAot {
134
+ environment(" FAF_DOMAIN" , " faforever.com" )
135
+ environment(" API_PROFILE" , " " )
136
+ }
137
+
129
138
ext {
130
139
131
140
}
Original file line number Diff line number Diff line change 2
2
3
3
import com .faforever .api .config .FafApiProperties ;
4
4
import com .faforever .api .config .FafApiProperties .Challonge ;
5
+ import jakarta .servlet .http .HttpServletRequest ;
5
6
import lombok .RequiredArgsConstructor ;
6
7
import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
7
8
import org .springframework .boot .web .client .RestTemplateBuilder ;
8
9
import org .springframework .cache .annotation .Cacheable ;
9
- import org .springframework .context .annotation .Scope ;
10
- import org .springframework .context .annotation .ScopedProxyMode ;
11
10
import org .springframework .http .HttpEntity ;
12
11
import org .springframework .http .HttpMethod ;
13
12
import org .springframework .http .MediaType ;
22
21
import org .springframework .web .util .DefaultUriBuilderFactory ;
23
22
import org .springframework .web .util .UriBuilder ;
24
23
25
- import jakarta .servlet .http .HttpServletRequest ;
26
24
import java .util .Map ;
27
25
import java .util .concurrent .CompletableFuture ;
28
26
37
35
* only loaded if a Challonge API key is specified.</p>
38
36
*/
39
37
@ RestController
40
- @ Scope (proxyMode = ScopedProxyMode .TARGET_CLASS )
41
38
@ RequestMapping (path = ChallongeController .CHALLONGE_ROUTE )
42
39
@ ConditionalOnProperty ("faf-api.challonge.key" )
43
40
public class ChallongeController {
Original file line number Diff line number Diff line change 1
1
package com .faforever .api .config ;
2
2
3
3
import com .faforever .api .i18n .RepositoryMessageSource ;
4
- import org .springframework .context .HierarchicalMessageSource ;
5
- import org .springframework .context .MessageSource ;
6
4
import org .springframework .context .annotation .Bean ;
7
5
import org .springframework .context .annotation .Configuration ;
8
6
import org .springframework .context .support .MessageSourceAccessor ;
9
7
10
- import jakarta .inject .Inject ;
11
-
12
8
@ Configuration
13
9
public class LocalizationConfig {
14
10
15
11
@ Bean
16
- public MessageSourceAccessor messageSourceAccessor (MessageSource messageSource ) {
12
+ public MessageSourceAccessor messageSourceAccessor (RepositoryMessageSource messageSource ) {
17
13
return new MessageSourceAccessor (messageSource );
18
14
}
19
-
20
- @ Inject
21
- public void configureMessageSource (HierarchicalMessageSource messageSource , RepositoryMessageSource repositoryMessageSource ) {
22
- messageSource .setParentMessageSource (repositoryMessageSource );
23
- }
24
15
}
Original file line number Diff line number Diff line change 18
18
import com .yahoo .elide .jsonapi .JsonApiSettings ;
19
19
import org .apache .commons .beanutils .ConvertUtils ;
20
20
import org .apache .commons .beanutils .Converter ;
21
+ import org .springframework .beans .factory .annotation .Qualifier ;
21
22
import org .springframework .beans .factory .config .AutowireCapableBeanFactory ;
22
23
import org .springframework .context .annotation .Bean ;
23
24
import org .springframework .context .annotation .Configuration ;
@@ -35,8 +36,8 @@ public class ElideConfig {
35
36
36
37
@ Bean
37
38
MultiplexManager multiplexDataStore (
38
- DataStore fafDataStore ,
39
- DataStore leagueDataStore
39
+ @ Qualifier ( "fafDataStore" ) DataStore fafDataStore ,
40
+ @ Qualifier ( "leagueDataStore" ) DataStore leagueDataStore
40
41
) {
41
42
return new MultiplexManager (fafDataStore , leagueDataStore );
42
43
}
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ spring:
71
71
rabbitmq :
72
72
host : ${RABBIT_HOST:127.0.0.1}
73
73
port : ${RABBIT_PORT:5672}
74
- username : ${RABBIT_USERNAME:faf-java- api}
74
+ username : ${RABBIT_USERNAME:faf-api}
75
75
password : ${RABBIT_PASSWORD:banana}
76
76
virtual-host : ${RABBIT_VHOST:/faf-core}
77
77
jpa :
@@ -80,8 +80,8 @@ spring:
80
80
oauth2 :
81
81
resourceserver :
82
82
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 /
85
85
logging :
86
86
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:
148
148
resourceserver :
149
149
jwt :
150
150
issuer-uri : ${JWT_FAF_HYDRA_ISSUER:https://hydra.${FAF_DOMAIN}/}
151
+ aot :
152
+ enabled : true
151
153
152
154
server :
153
155
# 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