Don't have "@EnableSwagger2 " in higher versions
@pjmike I ran into the exact same problem. After upgrading the springfox-swagger2 dependency from 2.7.0 to 2.8.0, it seemed as if the annotation springfox.documentation.swagger2.annotations.EnableSwagger2 was suddenly missing.
As you can see in version 2.8.0 of the API here, this annotation should definitely still be there in version 2.8.0, so this was really weird.
After searching far and wide and not finding an explanation for this anywhere, I finally tried deleting all Springfox dependencies from my local Maven repository:
rm -rf ~/.m2/repository/io/springfox
After that, I rebuilt my project and the annotation was magically there again with version 2.8.0 of the dependency. I hope this helps you and others as well. 馃槂
Most helpful comment
@pjmike I ran into the exact same problem. After upgrading the springfox-swagger2 dependency from 2.7.0 to 2.8.0, it seemed as if the annotation springfox.documentation.swagger2.annotations.EnableSwagger2 was suddenly missing.
As you can see in version 2.8.0 of the API here, this annotation should definitely still be there in version 2.8.0, so this was really weird.
After searching far and wide and not finding an explanation for this anywhere, I finally tried deleting all Springfox dependencies from my local Maven repository:
After that, I rebuilt my project and the annotation was magically there again with version 2.8.0 of the dependency. I hope this helps you and others as well. 馃槂