Swagger with Spring Boot and AWS Lambda
Asked Answered
H

2

6

I am trying to deploy a spring boot , Java, Swagger application, everything is working fine except the swagger UI.

I am getting this below error.

File path not allowed: /swagger-ui.html

at com.amazonaws.serverless.proxy.internal.SecurityUtils.getValidFilePath
(SecurityUtils.java:192) ~[task/:na]
Hintze answered 3/9, 2018 at 20:30 Comment(2)
Are you able to resolve the issueStaal
Are you trying to use spring-fox swagger ? What version of spring boot ?Camise
B
1

This is an old bug in Amazon's library.

<dependency>
    <groupId>com.amazonaws.serverless</groupId>
    <artifactId>aws-serverless-java-container-spring</artifactId>
</dependency>

Use the latest (or higher than 1.2).

https://github.com/awslabs/aws-serverless-java-container/pull/205

Bona answered 12/2, 2020 at 10:52 Comment(3)
My java container spring version is 1.3.1Spina
Do you have your pom on github ?Bona
or the full project per se ?Bona
S
0

Its a configuration issue. You need to check the configuration part. I have mentioned few tutorials,have a look int it.

Slingshot answered 7/2, 2020 at 6:58 Comment(1)
Why does the mentioned error come? If I receive this error, what configuration change should I do to fix that?Spina

© 2022 - 2024 — McMap. All rights reserved.