在使用Spring Boot的项目中,我们使用application.properties,但需要根据外部配置配置其中一些属性(如日志级别的端口号).我们通过API访问配置,因此仅在运行时才知道.
有没有办法在运行时覆盖或设置一些Spring属性(例如使用bean),如果是,如何实现?
spring spring-boot
spring ×1
spring-boot ×1