{"action":"created","issue":{"url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/807","repository_url":"https://api.github.com/repos/micronaut-projects/micronaut-core","labels_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/807/labels{/name}","comments_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/807/comments","events_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/807/events","html_url":"https://github.com/micronaut-projects/micronaut-core/issues/807","id":375026744,"node_id":"MDU6SXNzdWUzNzUwMjY3NDQ=","number":807,"title":"StaticResourceResolver.resolve edits parameter path in iteration","user":{"login":"mstego","id":44575336,"node_id":"MDQ6VXNlcjQ0NTc1MzM2","avatar_url":"https://avatars3.githubusercontent.com/u/44575336?v=4","gravatar_id":"","url":"https://api.github.com/users/mstego","html_url":"https://github.com/mstego","followers_url":"https://api.github.com/users/mstego/followers","following_url":"https://api.github.com/users/mstego/following{/other_user}","gists_url":"https://api.github.com/users/mstego/gists{/gist_id}","starred_url":"https://api.github.com/users/mstego/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstego/subscriptions","organizations_url":"https://api.github.com/users/mstego/orgs","repos_url":"https://api.github.com/users/mstego/repos","events_url":"https://api.github.com/users/mstego/events{/privacy}","received_events_url":"https://api.github.com/users/mstego/received_events","type":"User","site_admin":false},"labels":[{"id":956832756,"node_id":"MDU6TGFiZWw5NTY4MzI3NTY=","url":"https://api.github.com/repos/micronaut-projects/micronaut-core/labels/status:%20example%20attached","name":"status: example attached","color":"f95ce4","default":false},{"id":977098668,"node_id":"MDU6TGFiZWw5NzcwOTg2Njg=","url":"https://api.github.com/repos/micronaut-projects/micronaut-core/labels/status:%20under%20consideration","name":"status: under consideration","color":"c5def5","default":false}],"state":"open","locked":false,"assignee":{"login":"jameskleeh","id":1583789,"node_id":"MDQ6VXNlcjE1ODM3ODk=","avatar_url":"https://avatars2.githubusercontent.com/u/1583789?v=4","gravatar_id":"","url":"https://api.github.com/users/jameskleeh","html_url":"https://github.com/jameskleeh","followers_url":"https://api.github.com/users/jameskleeh/followers","following_url":"https://api.github.com/users/jameskleeh/following{/other_user}","gists_url":"https://api.github.com/users/jameskleeh/gists{/gist_id}","starred_url":"https://api.github.com/users/jameskleeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameskleeh/subscriptions","organizations_url":"https://api.github.com/users/jameskleeh/orgs","repos_url":"https://api.github.com/users/jameskleeh/repos","events_url":"https://api.github.com/users/jameskleeh/events{/privacy}","received_events_url":"https://api.github.com/users/jameskleeh/received_events","type":"User","site_admin":false},"assignees":[{"login":"jameskleeh","id":1583789,"node_id":"MDQ6VXNlcjE1ODM3ODk=","avatar_url":"https://avatars2.githubusercontent.com/u/1583789?v=4","gravatar_id":"","url":"https://api.github.com/users/jameskleeh","html_url":"https://github.com/jameskleeh","followers_url":"https://api.github.com/users/jameskleeh/followers","following_url":"https://api.github.com/users/jameskleeh/following{/other_user}","gists_url":"https://api.github.com/users/jameskleeh/gists{/gist_id}","starred_url":"https://api.github.com/users/jameskleeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameskleeh/subscriptions","organizations_url":"https://api.github.com/users/jameskleeh/orgs","repos_url":"https://api.github.com/users/jameskleeh/repos","events_url":"https://api.github.com/users/jameskleeh/events{/privacy}","received_events_url":"https://api.github.com/users/jameskleeh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-10-29T13:54:06Z","updated_at":"2018-11-02T15:21:55Z","closed_at":null,"author_association":"NONE","body":"When you configurate multiple static resources in your application.yaml and the mapping field has a leading \"/\" (and the first (default) mapping is \"/**\"),  the resolve method will just work for the first static resource. \r\nSo the AntPathMatcher will return true for the default mapping and the parameter path will be cut by the leading /.  But the requested resource will not be found in the default resource and the next iteration will be executed.\r\nIn the next iterations the pathMatcher.matches will return false because the parameter path was reduced by the leading \"/\".\r\n\r\nOf course there are workarounds for this issue, but i think this should be solve, either by \r\n\r\n1.  making a local copy of the parameter path which, will be reduced by the leading /\r\nor by\r\n2.  changing the logic in AntPathMatcher.matches for default mappings.\r\n\r\n\r\n - **Operating System:** Windows10\r\n- **Micronaut Version:** 1.0.0\r\n- **JDK Version:** 1.8\r\n\r\nexample application.yaml \r\n`router:\r\n   static-resources:\r\n      default:\r\n        mapping: /**\r\n       paths: classpath:static\r\n      swagger:\r\n        enabled: true\r\n        paths: classpath:swagger\r\n        mapping: /swaggerUI/**`"},"comment":{"url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/comments/435415406","html_url":"https://github.com/micronaut-projects/micronaut-core/issues/807#issuecomment-435415406","issue_url":"https://api.github.com/repos/micronaut-projects/micronaut-core/issues/807","id":435415406,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTQxNTQwNg==","user":{"login":"jameskleeh","id":1583789,"node_id":"MDQ6VXNlcjE1ODM3ODk=","avatar_url":"https://avatars2.githubusercontent.com/u/1583789?v=4","gravatar_id":"","url":"https://api.github.com/users/jameskleeh","html_url":"https://github.com/jameskleeh","followers_url":"https://api.github.com/users/jameskleeh/followers","following_url":"https://api.github.com/users/jameskleeh/following{/other_user}","gists_url":"https://api.github.com/users/jameskleeh/gists{/gist_id}","starred_url":"https://api.github.com/users/jameskleeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameskleeh/subscriptions","organizations_url":"https://api.github.com/users/jameskleeh/orgs","repos_url":"https://api.github.com/users/jameskleeh/repos","events_url":"https://api.github.com/users/jameskleeh/events{/privacy}","received_events_url":"https://api.github.com/users/jameskleeh/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T15:21:55Z","updated_at":"2018-11-02T15:21:55Z","author_association":"CONTRIBUTOR","body":"@mstego I ran the application and executed those 3 URLs and it returned the correct result\r\n\r\n```\r\nTestServer $ curl localhost:8080\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Title</title>\r\n</head>\r\n<body>\r\n  TEST MAIN\r\n</body>\r\n</html>TestServer $ curl localhost:8080/swaggerUI/\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Swagger</title>\r\n</head>\r\n<body>\r\n TEST SWAGGER\r\n</body>\r\n</html>TestServer $ curl localhost:8080/other/\r\n<!DOCTYPE html>\r\n<html lang=\"en\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Other Stuff</title>\r\n</head>\r\n<body>\r\nTest Other API\r\n</body>\r\n</html>TestServer $ \r\n```"}}
{"actor":{"display_login":"jameskleeh"}}