mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-11 14:52:01 +08:00
actually serve webjars
This commit is contained in:
parent
6a84b68980
commit
4aec8bc9c4
12
pom.xml
12
pom.xml
@ -53,6 +53,13 @@
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.10.5</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- old version -->
|
||||
<groupId>io.github.classgraph</groupId>
|
||||
<artifactId>classgraph</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
@ -81,6 +88,11 @@
|
||||
</dependency>
|
||||
|
||||
<!-- webjars -->
|
||||
<dependency>
|
||||
<groupId>org.webjars</groupId>
|
||||
<artifactId>webjars-locator</artifactId>
|
||||
<version>0.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.webjars.npm</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
|
@ -45,6 +45,13 @@ public class MvcConfig implements WebMvcConfigurer {
|
||||
.setCacheControl(CacheControl.maxAge(1, TimeUnit.DAYS))
|
||||
.resourceChain(true)
|
||||
.addResolver(new VersionResourceResolver());
|
||||
|
||||
registry
|
||||
.addResourceHandler("/lib/**")
|
||||
.addResourceLocations("/webjars/")
|
||||
.setCacheControl(CacheControl.maxAge(1, TimeUnit.DAYS))
|
||||
.resourceChain(true)
|
||||
.addResolver(new VersionResourceResolver());
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
Loading…
Reference in New Issue
Block a user