LoginSignup
2
1

More than 5 years have passed since last update.

SpringFoxでSpringSecurityが入っていないのにUnable to infer base urlが出た話

Last updated at Posted at 2018-08-04

概要

タイトルの通り。
SpringBootにSwagger+SpringFoxを導入しようとしたら、以下のようなエラーが出たので解決したメモを残す。
image.png

課題

このエラーで検索をかけても、「認証を突破する必要があるので、SpringSecutiryにSwagger認証をスキップする記述を加えるように」という旨の解決方法しか見つからなかった。
今回のSpringBootにSpringSecurityは入っていない。

参考
https://github.com/springfox/springfox/issues/1996

結論(解決方法)

springfox-swagger2とspringfox-swagger-uiのバージョンを、SpringBootのバージョンに合わせた。
今環境は以下
- SpringBoot 1.5.12
- springfox-swagger2 【変更前:2.9.2】→【変更後:2.6.1】
- springfox-swagger-ui 【変更前:2.9.2】→【変更後:2.6.1】

どうやら、SpringFoxの対応SpringBootバージョン<使用するSpringBootのバージョン
にする必要があるらしい

参考
SpringBoot:1.5.10対応と記述がある
https://mvnrepository.com/artifact/io.springfox/springfox-swagger2/2.6.1

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1