Problems in the use of spring boot redis

clipboard.png
the database index is configured in application.properties, but it is useless. It has been added to db0 by default. What is the cause of this?


in theory, it's OK to write this way, to see if you didn't compile the configuration file when compiling.


configuration file does not take effect. When, spring boot loads Redis, if no external configuration is detected, it will automatically be equipped with local localhost:6379 Redis,. You can see the source code. If the introduction of Redis starter, still doesn't work, manually write bean and inject it into the spring container, adding @ primary annotation just to be on the safe side

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35ba0-2bfae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35ba0-2bfae.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?