From 5437197c9495fb10eb1f918d89872b2e13e54d39 Mon Sep 17 00:00:00 2001 From: malkoas Date: Wed, 19 Oct 2022 14:59:56 +0300 Subject: [PATCH] Change riak property name --- .../java/dev/vality/wb/list/manager/config/RiakConfig.java | 4 ++-- .../dev/vality/wb/list/manager/repository/ListRepository.java | 2 +- src/main/resources/application.yml | 2 +- src/test/java/dev/vality/wb/list/manager/RiakTest.java | 2 +- .../wb/list/manager/extension/RiakTestcontainerExtension.java | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/dev/vality/wb/list/manager/config/RiakConfig.java b/src/main/java/dev/vality/wb/list/manager/config/RiakConfig.java index d97107e..6750b4a 100644 --- a/src/main/java/dev/vality/wb/list/manager/config/RiakConfig.java +++ b/src/main/java/dev/vality/wb/list/manager/config/RiakConfig.java @@ -10,10 +10,10 @@ import org.springframework.context.annotation.Configuration; @Configuration public class RiakConfig { - @Value("${riak.port}") + @Value("${riak-config.port}") public int riakPort; - @Value("${riak.address}") + @Value("${riak-config.address}") public String riakAddress; @Bean diff --git a/src/main/java/dev/vality/wb/list/manager/repository/ListRepository.java b/src/main/java/dev/vality/wb/list/manager/repository/ListRepository.java index 97abafc..dd2f8fa 100644 --- a/src/main/java/dev/vality/wb/list/manager/repository/ListRepository.java +++ b/src/main/java/dev/vality/wb/list/manager/repository/ListRepository.java @@ -27,7 +27,7 @@ public class ListRepository implements CrudRepository { private static final String TEXT_PLAIN = "text/plain"; private final RiakClient client; - @Value("${riak.bucket}") + @Value("${riak-config.bucket}") private String bucket; @Override diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 85bdffe..6d69800 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -37,7 +37,7 @@ spring: streams: application-id: wb-list client-id: wb-list-client -riak: +riak-config: address: localhost port: 8087 bucket: wblist diff --git a/src/test/java/dev/vality/wb/list/manager/RiakTest.java b/src/test/java/dev/vality/wb/list/manager/RiakTest.java index dbb3da9..7a6a4b7 100644 --- a/src/test/java/dev/vality/wb/list/manager/RiakTest.java +++ b/src/test/java/dev/vality/wb/list/manager/RiakTest.java @@ -29,7 +29,7 @@ public class RiakTest { private static final String VALUE = "value"; private static final String KEY = "key"; - @Value("${riak.bucket}") + @Value("${riak-config.bucket}") private String bucketName; @Autowired diff --git a/src/test/java/dev/vality/wb/list/manager/extension/RiakTestcontainerExtension.java b/src/test/java/dev/vality/wb/list/manager/extension/RiakTestcontainerExtension.java index 170232c..ba17926 100644 --- a/src/test/java/dev/vality/wb/list/manager/extension/RiakTestcontainerExtension.java +++ b/src/test/java/dev/vality/wb/list/manager/extension/RiakTestcontainerExtension.java @@ -62,8 +62,8 @@ public class RiakTestcontainerExtension implements BeforeAllCallback, AfterAllCa var container = THREAD_CONTAINER.get(); if (container != null) { TestPropertyValues.of( - "riak.address=" + container.getContainerIpAddress(), - "riak.port=" + container.getMappedPort(8087)) + "riak-config.address=" + container.getContainerIpAddress(), + "riak-config.port=" + container.getMappedPort(8087)) .applyTo(context); } };