{"action":"created","issue":{"url":"https://api.github.com/repos/springfox/springfox/issues/1160","labels_url":"https://api.github.com/repos/springfox/springfox/issues/1160/labels{/name}","comments_url":"https://api.github.com/repos/springfox/springfox/issues/1160/comments","events_url":"https://api.github.com/repos/springfox/springfox/issues/1160/events","html_url":"https://github.com/springfox/springfox/issues/1160","id":130448662,"number":1160,"title":"Swagger url throwing 404","user":{"login":"dinee432","id":8139415,"avatar_url":"https://avatars.githubusercontent.com/u/8139415?v=3","gravatar_id":"","url":"https://api.github.com/users/dinee432","html_url":"https://github.com/dinee432","followers_url":"https://api.github.com/users/dinee432/followers","following_url":"https://api.github.com/users/dinee432/following{/other_user}","gists_url":"https://api.github.com/users/dinee432/gists{/gist_id}","starred_url":"https://api.github.com/users/dinee432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinee432/subscriptions","organizations_url":"https://api.github.com/users/dinee432/orgs","repos_url":"https://api.github.com/users/dinee432/repos","events_url":"https://api.github.com/users/dinee432/events{/privacy}","received_events_url":"https://api.github.com/users/dinee432/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/springfox/springfox/labels/question","name":"question","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/springfox/springfox/milestones/35","html_url":"https://github.com/springfox/springfox/milestones/2.4.0","labels_url":"https://api.github.com/repos/springfox/springfox/milestones/35/labels","id":1277614,"number":35,"title":"2.4.0","description":"","creator":{"login":"dilipkrish","id":73257,"avatar_url":"https://avatars.githubusercontent.com/u/73257?v=3","gravatar_id":"","url":"https://api.github.com/users/dilipkrish","html_url":"https://github.com/dilipkrish","followers_url":"https://api.github.com/users/dilipkrish/followers","following_url":"https://api.github.com/users/dilipkrish/following{/other_user}","gists_url":"https://api.github.com/users/dilipkrish/gists{/gist_id}","starred_url":"https://api.github.com/users/dilipkrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dilipkrish/subscriptions","organizations_url":"https://api.github.com/users/dilipkrish/orgs","repos_url":"https://api.github.com/users/dilipkrish/repos","events_url":"https://api.github.com/users/dilipkrish/events{/privacy}","received_events_url":"https://api.github.com/users/dilipkrish/received_events","type":"User","site_admin":false},"open_issues":39,"closed_issues":20,"state":"open","created_at":"2015-08-28T14:23:58Z","updated_at":"2016-02-01T19:26:35Z","due_on":"2016-03-01T06:00:00Z","closed_at":null},"comments":4,"created_at":"2016-02-01T18:50:29Z","updated_at":"2016-02-01T20:33:38Z","closed_at":null,"body":"Hi,\r\n\r\n  I have a spring mvc web services maven project and I need to configure swagger for it. I am getting 404 not found error on accessing swagger through http://localhost:8080/test/v2/api-docs.\r\n\r\nI have created a swagger configuration file as below\r\n\r\n```java\r\n@Configuration\r\n@EnableWebMvc\r\n@EnableSwagger2\r\n@ComponentScan(basePackages = { \"com.xxx.test\" })\r\npublic class MvcConfig extends WebMvcConfigurerAdapter {\r\n\t @Override\r\n\t    public void addResourceHandlers(final ResourceHandlerRegistry registry) {\r\n\t        registry.addResourceHandler(\"swagger-ui.html\").addResourceLocations(\"classpath:/META-INF/resources/\");\r\n\t        System.out.println(\"Reached configuration\");\r\n\t        registry.addResourceHandler(\"/webjars/**\").addResourceLocations(\"classpath:/META-INF/resources/webjars/\");\r\n\t    }\r\n}\r\n```\r\nAdded the below dependencies\r\n\r\n```xml\r\n<dependency>\r\n\t\t<groupId>io.springfox</groupId>\r\n\t\t<artifactId>springfox-swagger2</artifactId>\r\n\t\t<version>2.1.1</version>\r\n    </dependency>\r\n     <dependency>\r\n            <groupId>io.springfox</groupId>\r\n            <artifactId>springfox-spring-web</artifactId>\r\n            <version>2.1.1</version>\r\n        </dependency>\r\n\r\n        <dependency>\r\n            <groupId>io.swagger</groupId>\r\n            <artifactId>swagger-annotations</artifactId>\r\n            <version>1.5.0</version>\r\n        </dependency>\r\n\r\n        <dependency>\r\n            <groupId>io.springfox</groupId>\r\n            <artifactId>springfox-swagger-common</artifactId>\r\n            <version>2.1.1</version>\r\n        </dependency>\r\n\t<dependency>\r\n\t    <groupId>io.springfox</groupId>\r\n\t    <artifactId>springfox-swagger-ui</artifactId>\r\n\t    <version>2.2.2</version>\r\n\t</dependency>\r\n```"},"comment":{"url":"https://api.github.com/repos/springfox/springfox/issues/comments/178174051","html_url":"https://github.com/springfox/springfox/issues/1160#issuecomment-178174051","issue_url":"https://api.github.com/repos/springfox/springfox/issues/1160","id":178174051,"user":{"login":"dinee432","id":8139415,"avatar_url":"https://avatars.githubusercontent.com/u/8139415?v=3","gravatar_id":"","url":"https://api.github.com/users/dinee432","html_url":"https://github.com/dinee432","followers_url":"https://api.github.com/users/dinee432/followers","following_url":"https://api.github.com/users/dinee432/following{/other_user}","gists_url":"https://api.github.com/users/dinee432/gists{/gist_id}","starred_url":"https://api.github.com/users/dinee432/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dinee432/subscriptions","organizations_url":"https://api.github.com/users/dinee432/orgs","repos_url":"https://api.github.com/users/dinee432/repos","events_url":"https://api.github.com/users/dinee432/events{/privacy}","received_events_url":"https://api.github.com/users/dinee432/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T20:33:38Z","updated_at":"2016-02-01T20:33:38Z","body":"I had set the  ignoreUnresolvablePlaceholders to true but still receiving the same 404.\r\n\r\n<bean\r\n\t\tclass=\"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer\">\r\n\t\t<property name=\"ignoreUnresolvablePlaceholders\" value=\"true\" />\r\n\t    <property name=\"ignoreResourceNotFound\" value=\"true\" />\r\n\t\t<property name=\"locations\">\r\n\t\t\t<list>\r\n\t\t\t\t<value>filename.properties</value>\r\n\t\t\t</list>\r\n\t\t</property>\r\n\t</bean>"}}