{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/12786","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/12786/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/12786/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/12786/events","html_url":"https://github.com/spring-projects/spring-boot/issues/12786","id":311896416,"number":12786,"title":"Failed to bind properties under 'server.tomcat.basedir' to java.io.File for 1.5.11","user":{"login":"hdconradi","id":12926640,"avatar_url":"https://avatars1.githubusercontent.com/u/12926640?v=4","gravatar_id":"","url":"https://api.github.com/users/hdconradi","html_url":"https://github.com/hdconradi","followers_url":"https://api.github.com/users/hdconradi/followers","following_url":"https://api.github.com/users/hdconradi/following{/other_user}","gists_url":"https://api.github.com/users/hdconradi/gists{/gist_id}","starred_url":"https://api.github.com/users/hdconradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdconradi/subscriptions","organizations_url":"https://api.github.com/users/hdconradi/orgs","repos_url":"https://api.github.com/users/hdconradi/repos","events_url":"https://api.github.com/users/hdconradi/events{/privacy}","received_events_url":"https://api.github.com/users/hdconradi/received_events","type":"User","site_admin":false},"labels":[{"id":78544176,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/type:%20regression","name":"type: regression","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"assignees":[{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/111","html_url":"https://github.com/spring-projects/spring-boot/milestone/111","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/milestones/111/labels","id":3332825,"number":111,"title":"1.5.14","description":"","creator":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":13,"state":"open","created_at":"2018-05-09T10:27:02Z","updated_at":"2018-05-17T14:18:36Z","due_on":"2018-07-04T07:00:00Z","closed_at":null},"comments":8,"created_at":"2018-04-06T08:51:57Z","updated_at":"2018-05-17T22:05:25Z","closed_at":"2018-05-17T10:39:50Z","author_association":"NONE","body":"When updating from 1.5.10 -> 1.5.11 and using `server.tomcat.basedir=.` or `server.tomcat.basedir=\\.`\r\nthe application failed to start with the error\r\n\r\n```\r\nBinding to target org.springframework.boot.autoconfigure.web.ServerProperties@66948673 failed:\r\n\r\n    Property: server.tomcat.basedir\r\n    Value: ./\r\n    Reason: Failed to convert property value of type 'java.lang.String' to required type 'java.io.File' for property 'tomcat.basedir'; nested exception is java.lang.IllegalArgumentException: Could not retrieve file for class path resource []: class path resource [] cannot be resolved to absolute file path because it does not reside in the file system: jar:file:/opt/icw/product/c2id-facade-1.4-SNAPSHOT/c2id-facade.jar!/BOOT-INF/classes!/\r\n```\r\nI have reproduced the failure with the `spring-boot-sample-web-secure` project, by adding the property:\r\n```\r\ndiff --git a/spring-boot-samples/spring-boot-sample-web-secure/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-web-secure/src/main/resources/application.properties\r\nindex e1935fa698..2c0ba1c4dd 100644\r\n--- a/spring-boot-samples/spring-boot-sample-web-secure/src/main/resources/application.properties\r\n+++ b/spring-boot-samples/spring-boot-sample-web-secure/src/main/resources/application.properties\r\n@@ -1,3 +1,5 @@\r\n+server.tomcat.basedir=./\r\n+\r\n spring.thymeleaf.cache: false\r\n security.basic.enabled: false\r\n # demo only:\r\n```\r\nIt is important to notice that the project continues to build fine.\r\nHowever, when executing the jar with e.g.:\r\n```\r\njava -jar target/spring-boot-sample-web-secure-1.5.11.RELEASE.jar\r\n```\r\nthe above error occurs.\r\nThis is probably due to the fact that in the `ClassPathResource#getURL` the url has the value\r\n`jar:file:/home/<some-path>/target/spring-boot-sample-web-secure-1.5.11.RELEASE.jar!/BOOT-INF/classes!/` while the 'jar'-prefix is missing starting the application in the tests.\r\n\r\nThis might be related to #12163. \r\nThat is a spring-boot 2 bug, but the description reads very similar.\r\nIt is in particular true that a value `server.tomcat.basedir=../spring-boot-sample-web-secure` works."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/390028941","html_url":"https://github.com/spring-projects/spring-boot/issues/12786#issuecomment-390028941","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/12786","id":390028941,"user":{"login":"hdconradi","id":12926640,"avatar_url":"https://avatars1.githubusercontent.com/u/12926640?v=4","gravatar_id":"","url":"https://api.github.com/users/hdconradi","html_url":"https://github.com/hdconradi","followers_url":"https://api.github.com/users/hdconradi/followers","following_url":"https://api.github.com/users/hdconradi/following{/other_user}","gists_url":"https://api.github.com/users/hdconradi/gists{/gist_id}","starred_url":"https://api.github.com/users/hdconradi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hdconradi/subscriptions","organizations_url":"https://api.github.com/users/hdconradi/orgs","repos_url":"https://api.github.com/users/hdconradi/repos","events_url":"https://api.github.com/users/hdconradi/events{/privacy}","received_events_url":"https://api.github.com/users/hdconradi/received_events","type":"User","site_admin":false},"created_at":"2018-05-17T22:05:25Z","updated_at":"2018-05-17T22:05:25Z","author_association":"NONE","body":"Thanks a lot."}}
{"actor":{"display_login":"hdconradi"}}