diff --git a/backend/services/project-management/src/test/resources/application.properties b/backend/services/project-management/src/test/resources/application.properties index 0f65ecb2f4..efef6fcdcc 100644 --- a/backend/services/project-management/src/test/resources/application.properties +++ b/backend/services/project-management/src/test/resources/application.properties @@ -13,7 +13,7 @@ quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true # logging.file.path=/opt/metersphere/logs/metersphere # Hikari -spring.datasource.url=jdbc:mysql://localhost:${embedded.mysql.port}/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://${embedded.mysql.host}:${embedded.mysql.port}/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=${embedded.mysql.user} spring.datasource.password=${embedded.mysql.password} spring.datasource.type=com.zaxxer.hikari.HikariDataSource @@ -66,7 +66,7 @@ management.endpoints.web.exposure.include=* management.endpoints.enabled-by-default=false # redis spring.session.timeout=43200s -spring.data.redis.host=localhost +spring.data.redis.host=${embedded.redis.host} spring.data.redis.password=${embedded.redis.password} spring.data.redis.port=${embedded.redis.port} spring.session.redis.repository-type=indexed diff --git a/backend/services/system-setting/src/test/resources/application.properties b/backend/services/system-setting/src/test/resources/application.properties index 0f65ecb2f4..efef6fcdcc 100644 --- a/backend/services/system-setting/src/test/resources/application.properties +++ b/backend/services/system-setting/src/test/resources/application.properties @@ -13,7 +13,7 @@ quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true # logging.file.path=/opt/metersphere/logs/metersphere # Hikari -spring.datasource.url=jdbc:mysql://localhost:${embedded.mysql.port}/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://${embedded.mysql.host}:${embedded.mysql.port}/test?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8 spring.datasource.username=${embedded.mysql.user} spring.datasource.password=${embedded.mysql.password} spring.datasource.type=com.zaxxer.hikari.HikariDataSource @@ -66,7 +66,7 @@ management.endpoints.web.exposure.include=* management.endpoints.enabled-by-default=false # redis spring.session.timeout=43200s -spring.data.redis.host=localhost +spring.data.redis.host=${embedded.redis.host} spring.data.redis.password=${embedded.redis.password} spring.data.redis.port=${embedded.redis.port} spring.session.redis.repository-type=indexed