java - spring boot multiple modules multiple property files @Propertysource not working -
i have 1 main project , 1 dependent project auditmodule. auditmodule has own datasource , , database properties in auditapplication.properties. main application has own application.properties.main project depends on audit project auditing stuff. when run main application , it's not detecting auditapplication.properties in audit module.
below databaseconfiguration classes in main project , in audit project:
main project:
@configuration @enablejparepositories(basepackages = "com.staples.mpe.repository", entitymanagerfactoryref = "mpeentitymanager", transactionmanagerref = "mpetransactionmanager") @enabletransactionmanagement public class databaseconfiguration implements environmentaware {}
audit project:
@configuration @enablejparepositories(basepackages = "com.staples.em.magnus.audit.repository", entitymanagerfactoryref = "auditentitymanager") @enabletransactionmanagement @propertysource("classpath:auditapplication.properties") public class auditdatabaseconfiguration implements environmentaware { }
i have mentioned @propertysource annotation on auditdatabaseconfiguration class, when run main project , should not detect application.properties in main project should detect auditapplication.properties in audit project.
but throwing error can't configure auditdatasource bean pulling properties auditapplication.properties.
any appreciated.
thanks
Comments
Post a Comment