Home > Back-end >  Application. The problem of the properties file
Application. The problem of the properties file

Time:04-18

I met a very strange question, springboot configure redis, normal should spring. Redis. XXX and my profile without spring prefix, but applications can run normally, , but CTRL point point is not enough, prompt can not find a file,
If I add spring prefix, CTRL can order went in, and the program is running make a mistake, that is to say, configure redis, cannot add spring. The prefix, but normal is not to want to add? Why must not add this project to me?

CodePudding user response:

Spring automatic injection of the boot help you add prefix: @ ConfigurationProperties (
The prefix="spring. Redis"
)

CodePudding user response:

I wrote before the demo, it is spring. The redis. XXX writing, don't know why this project will not be able to add spring. The prefix, if automatic injection, should CTRL can point it in,
  • Related