From a2fbd6a7d63ea86c7b46696730359bed9952298e Mon Sep 17 00:00:00 2001 From: bwcx_jzy Date: Sun, 1 Aug 2021 00:31:31 +0800 Subject: [PATCH] =?UTF-8?q?ssh=20=E5=BF=AB=E6=8D=B7=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AB=AF=E6=A3=80=E6=9F=A5=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8D=E5=9C=A8=E4=BD=BF=E7=94=A8=20Spring?= =?UTF-8?q?Boot=20=E9=9D=9E=20public=20=E5=B7=A5=E5=85=B7=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/server/src/test/java/TestYml.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/server/src/test/java/TestYml.java b/modules/server/src/test/java/TestYml.java index bf7dbdace..4ffedb679 100644 --- a/modules/server/src/test/java/TestYml.java +++ b/modules/server/src/test/java/TestYml.java @@ -1,4 +1,5 @@ import cn.hutool.core.io.resource.ResourceUtil; +import io.jpom.system.ConfigBean; import org.junit.Test; import org.springframework.boot.env.YamlPropertySourceLoader; import org.springframework.core.env.PropertySource; @@ -23,5 +24,8 @@ public class TestYml { List> test = yamlPropertySourceLoader.load("test", new FileUrlResource(path)); PropertySource propertySource = test.get(0); System.out.println(propertySource); + + Object user = propertySource.getProperty(ConfigBean.AUTHORIZE_USER_KEY); + System.out.println(user); } }