{"action":"closed","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6103","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6103/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6103/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/6103/events","html_url":"https://github.com/spring-projects/spring-boot/issues/6103","id":157925274,"number":6103,"title":"Spring Boot Autoconfig of Redis should be @ConditionalOnProperty(spring.redis.host)","user":{"login":"zampettim","id":4174222,"avatar_url":"https://avatars.githubusercontent.com/u/4174222?v=3","gravatar_id":"","url":"https://api.github.com/users/zampettim","html_url":"https://github.com/zampettim","followers_url":"https://api.github.com/users/zampettim/followers","following_url":"https://api.github.com/users/zampettim/following{/other_user}","gists_url":"https://api.github.com/users/zampettim/gists{/gist_id}","starred_url":"https://api.github.com/users/zampettim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zampettim/subscriptions","organizations_url":"https://api.github.com/users/zampettim/orgs","repos_url":"https://api.github.com/users/zampettim/repos","events_url":"https://api.github.com/users/zampettim/events{/privacy}","received_events_url":"https://api.github.com/users/zampettim/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-01T14:44:34Z","updated_at":"2016-06-21T01:25:57Z","closed_at":"2016-06-21T01:25:57Z","body":"<!--\r\nThanks for raising a Spring Boot issue. What sort of issue are you raising?\r\n\r\nQuestion\r\n\r\nPlease ask questions about how to use something, or to understand why something isn't\r\nworking as you expect it to, on Stack Overflow using the spring-boot tag.\r\n\r\nBug report\r\n\r\nPlease provide details of the problem, including the version of Spring Boot that you\r\nare using. If possible, please provide a test case or sample application that reproduces\r\nthe problem. This makes it much easier for us to diagnose the problem and to verify that\r\nwe have fixed it.\r\n\r\nEnhancement\r\n\r\nPlease start by describing the problem that you are trying to solve. There may already\r\nbe a solution, or there may be a way to solve it that you hadn't considered.\r\n-->\r\n\r\nWith Spring Boot 1.3.5, (and 1.3.x in general), Redis Auto configuration always tries to configure a Redis connection if Redis is in the classpath. This causes issues when an app wishes to use its own Auto Configuration to enable or disable Redis. For example, if dev, I want to use the local Session implementation, but in production, I want to use Redis. I have auto configuration that keys off of the existence of the \"spring.redis.host\" property. This may also apply to the case where when running unit tests, want to use in-memory local session.\r\n\r\nRight now, as soon as RedisAutoConfiguration is used, it attempts to create a JedisConnectionFactory, which in turn fails because no host information is configured.\r\n\r\nI think just need to add \r\n```@ConditionalOnProperty(prefix = \"spring.redis\", name = \"host\", matchIfMissing=false)```\r\nto RedisAutoConfiguration to resolve this."}}
{"actor":{"display_login":"spring-issuemaster"}}