FINERACT-1480: Fix Swagger UI broken by incremental build
This commit is contained in:
committed by
Petri Tuomola
parent
ab6323e474
commit
4d879eddc4
@@ -247,6 +247,8 @@ bootRun {
|
||||
dependencies {
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.3'
|
||||
}
|
||||
|
||||
classpath += files("build/generated/swagger-ui")
|
||||
}
|
||||
|
||||
springBoot {
|
||||
@@ -266,6 +268,14 @@ bootJar {
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
from('build/generated/swagger-ui') {
|
||||
include '*'
|
||||
}
|
||||
}
|
||||
|
||||
jar.dependsOn resolve
|
||||
|
||||
jib {
|
||||
from {
|
||||
image = 'azul/zulu-openjdk-alpine:17'
|
||||
|
||||
+2
-1
@@ -46,7 +46,8 @@ public class WebFrontEndConfiguration implements WebMvcConfigurer {
|
||||
LOG.info("Found Swagger UI at {}", fullPathToSwaggerUiJs);
|
||||
String fullPathToSwaggerUi = fullPathToSwaggerUiJs.substring(0, fullPathToSwaggerUiJs.lastIndexOf("/") + 1);
|
||||
|
||||
final String[] swaggerResourceLocations = { "classpath:/static/swagger-ui/", "classpath:" + fullPathToSwaggerUi };
|
||||
final String[] swaggerResourceLocations = { "classpath:/static/swagger-ui/", "classpath:fineract.yaml",
|
||||
"classpath:" + fullPathToSwaggerUi };
|
||||
|
||||
registry.addResourceHandler("/swagger-ui/**").addResourceLocations(swaggerResourceLocations);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user