But such as Redis, can appear the following questions,
Configuration no problem, can prove this:
Suspected to be connected with springboot start order, but don't know where to start, please give advice or comments!
CodePudding user response:
Some online posts, are basic springboot integration, don't all have encountered such a problem?CodePudding user response:
You the # {coldConfigGroup [' redis. Host]} expression from which to see, is not to identify, this is the problem of redis connection, normal server configuration of the machine address or 127.0.0.1CodePudding user response:
Variable is not identifyPut the actual value directly
CodePudding user response:
Configuration is wrong, you change the# redis server address (the default is loaclhost)
Host: 127.0.0.1
# redis port (default is 6379)
Post: 6379
CodePudding user response:
@ tianfang @ night also my aim is to put the configuration and application isolation, not the database connection string, database password, IP port production environment and other sensitive information in the spring configuration file, you can know about the config-toolkit:https://github.com/dangdangdotcom/config-toolkit/wikiCodePudding user response:
Under debugging RedisProperties. GetHost () the value of theValue and should be @ @ ConfigurationProperties two external data processing method is different, the config - toolkit can only change the Spring's handling of the @ Value
Can use @ the Value in the configuration class into config - toolkit processing after the host, and then reference manual registration LettuceConnectionFactory springboot code
CodePudding user response: