Project to do separation, the previous operation of the project to do a separate processing, the original Redis cache naturally to separate, to avoid maximizing the impact of changes on the function, for caching the database is just a separate project Redis library (database)
This redis is stated in the Spring.xml configuration.
<bean id= "Jedispool" class= "Redis.clients.jedis.JedisPool" >
<constructor-arg ref= "Jedispoolconfig"/ >
<constructor-arg value= "${redis.ip}"/>
<constructor-arg value= "${redis.port}"/>
<constructor-arg value= "${redis.timeout}"/>
<constructor-arg value= "${redis.database}"/>
</bean>
Next in the development of the service test, cache processing times are wrong, as the title sees Jedis.exceptions.JedisDataException:ERR Client sent AUTH, but no password is set
In Csdn to find some of our predecessors to solve the experience, links
It only mentions password access, and no profile startup, and does not solve my problem very well (multiple Redis ports under the same server cannot be started without configuration files)
Since I am a password-free access, I have referred to the old project after the discovery of such a solution
<bean id= "Jedispool" class= "Redis.clients.jedis.JedisPool" >
<constructor-arg ref= "Jedispoolconfig"/ >
<constructor-arg value= "${redis.ip}"/>
<constructor-arg value= "${redis.port}"/>
<constructor-arg value= "${redis.timeout}"/>
<constructor-arg ><null/></constructor-arg >
<constructor-arg value= "${redis.database}"/>
</bean>
It's just an extra line.
<constructor-arg ><null/></constructor-arg>
To bring my service back to the dead, magical magic, my guess is that this line of position is exactly the location of the password, the incoming null is exactly the corresponding password-free access, so that the process continues.
Writing programs can not only look at the results, but also to understand the process, the above is just perfect service, only when I really understand the process to have a better editor.
Also hope that you peer to guide ~