Unless I have overlooked something, I think we may have missed some changes when determining the scope of #11574.

MongoProperties in org.springframework.boot.autoconfigure.mongo has the prefix spring.data.mongodb but its settings are applied by MongoAutoConfiguration which does not depend on Spring Data. The prefix should be changed to spring.mongodb.

We should review the other stores as well.

Comment From: HyunSangHan

@wilkinsona Hi, I've checked the current state of the properties and their corresponding auto-configuration classes.

Here’s the result:

AutoConfiguration file Requires Spring Data
RedisAutoConfiguration.java O
Neo4jDataAutoConfiguration.java O
CouchbaseDataAutoConfiguration.java O
JdbcRepositoriesAutoConfiguration.java O
SpringDataWebAutoConfiguration.java O
RepositoryRestMvcAutoConfiguration.java O
MongoAutoConfiguration.java X
MongoDataAutoConfiguration.java O

From what I can see, the mismatch only exists for Mongo.
If the milestone for resolving this issue is 4.0.x, I assume that breaking changes are acceptable, so we could drop the data prefix here.

If you agree with this direction, I’d be happy to prepare a quick PR to address it. :)

Comment From: wilkinsona

Thanks for the offer, @HyunSangHan, but I've already started looking at this (hence the creation of #47043 and #47044).