refactor: reject legacy identity store modes

This commit is contained in:
lingniu
2026-07-01 08:38:50 +08:00
parent 625d09c856
commit dcd5f2a1a2
2 changed files with 27 additions and 5 deletions

View File

@@ -23,6 +23,18 @@ public class VehicleIdentityAutoConfiguration {
return new ObjectMapper();
}
@Bean
@ConditionalOnProperty(prefix = "lingniu.ingest.identity", name = "store", havingValue = "file")
public Object rejectedLegacyFileIdentityStore() {
throw new IllegalStateException("identity.store=file has been removed; configure identity.store=mysql");
}
@Bean
@ConditionalOnProperty(prefix = "lingniu.ingest.identity", name = "store", havingValue = "sqlite")
public Object rejectedLegacySqliteIdentityStore() {
throw new IllegalStateException("identity.store=sqlite has been removed; configure identity.store=mysql");
}
@Bean
@ConditionalOnMissingBean({VehicleIdentityResolver.class, VehicleIdentityRegistry.class})
@ConditionalOnProperty(prefix = "lingniu.ingest.identity", name = "store", havingValue = "mysql",