问题
I am converting an older java 6 SOAP project to java 8 with spring boot and swagger. I used to be able to use swagger before autowiring a service but now I get a white page in browser with errors rapidly appearing in the console of chrome.
pom.xml
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.8.0</version>
</dependency>
application.yaml
server:
port: 30001
In the url there is localhost/null/swagger so I assume the problem is there somewhere, I changed the context to test and then the error was localhost/test/null/swagger..
@SpringBootApplication(scanBasePackages = {
"com.company.location.myprogram"
})
public class WebserviceApplication {
来源:https://stackoverflow.com/questions/50151638/spring-boot-swagger2-404