Can't find @EnableSwagger annotation
Solution 1
Same here. springfox.documentation.swagger2 jar doesn't exist in springfox-core:2.7.0 They exist in the previous release of 2.6.1 when I was working with it before. I'm falling back to 2.6.1.
It's probably not a bad idea to check their 2.7.0 release notes to see if there's any bug fix that you need though: https://github.com/springfox/springfox/releases/tag/2.7.0
UPDATE: @EnableSwagger is actually in springfox-swagger2-2.7.0.jar not springfox-core.jar.
Solution 2
It shoud be in springfox.documentation.swagger2.annotations
package.
Habchi
Freelancer developer and designer java slayer python ninja web development chief photoshop master illustrator guru blender killer Other dev langages Haskell, Ocaml, C/C++, VB.net Games World Of Warcraft GTA series The witcher series
Updated on August 11, 2022Comments
-
Habchi over 1 year
I just wanted to documente my spring rest application. Following the how to with springfox I added as a dependency in my pom.xml:
<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> </dependency>
the jar is downloaded correctly but I can't find @EnableSwagger2 annotation nowhere.