/
NikolayIvkin
/
tutorials1
Обзор
Документация
Войти
/
NikolayIvkin
/
tutorials1
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
testing-modules/spring-testing/src/main/java/com/baeldung/testpropertysource/ClassUsingProperty.java
22 строки
520 B
Oscar Mauricio Forero Carrillo
BAEL-7136: Improve the companion code for the article to include multiple properties in the @PropertySource annotation (#15885)
16 фев 2024, 21:57
Не верифицирован
16 фев 2024, 21:57
a61328e
Код
Авторство
О чём код?
package com.baeldung.testpropertysource; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; @Component public class ClassUsingProperty { @Value("${baeldung.testpropertysource.one}") private String propertyOne; @Value("${baeldung.testpropertysource.two}") private String propertyTwo; public String retrievePropertyOne() { return propertyOne; } public String retrievePropertyTwo() { return propertyTwo; } }