mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-03-13 15:39:18 +08:00
fix circular dep issue
This commit is contained in:
parent
b6c34e616d
commit
9f85cae252
@ -0,0 +1,18 @@
|
||||
package io.papermc.hangar.config;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.expression.BeanFactoryResolver;
|
||||
import org.springframework.expression.spel.support.StandardEvaluationContext;
|
||||
|
||||
@Configuration
|
||||
public class SpELConfig {
|
||||
|
||||
@Bean
|
||||
public StandardEvaluationContext standardEvaluationContext(final ApplicationContext applicationContext) {
|
||||
final StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
|
||||
evaluationContext.setBeanResolver(new BeanFactoryResolver(applicationContext));
|
||||
return evaluationContext;
|
||||
}
|
||||
}
|
@ -189,11 +189,4 @@ public class WebConfig extends WebMvcConfigurationSupport {
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@Bean
|
||||
public StandardEvaluationContext standardEvaluationContext(ApplicationContext applicationContext) {
|
||||
StandardEvaluationContext evaluationContext = new StandardEvaluationContext();
|
||||
evaluationContext.setBeanResolver(new BeanFactoryResolver(applicationContext));
|
||||
return evaluationContext;
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ public record ProjectsConfig( // TODO split into ProjectsConfig and VersionsConf
|
||||
@DefaultValue("5") int maxChannels,
|
||||
@DefaultValue("30000") int maxBBCodeLen,
|
||||
@DefaultValue("25") int initLoad,
|
||||
@DefaultValue("10") int initVersionLoad, // TODO implement (see @ConfigurePagination)
|
||||
@DefaultValue("10") int initVersionLoad,
|
||||
@DefaultValue("120") int maxDescLen,
|
||||
@DefaultValue("500") int maxSponsorsLen,
|
||||
@DefaultValue("5") int maxKeywords,
|
||||
|
@ -18,7 +18,7 @@ public @interface ConfigurePagination {
|
||||
long maxLimit() default -1;
|
||||
|
||||
@Language("SpEL")
|
||||
String maxLimitString() default ""; // TODO implement
|
||||
String maxLimitString() default "";
|
||||
|
||||
long defaultLimit() default -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user