[BAEL-1626] testing-modules | A Quick Guide to @TestPropertySource - move to existing submodule (#5292)
* *added tests using testpropertysource * fix: using property for version in pom file * fix, added dependency with compile scope to build successfully on mvn clean install * * moved testpropertysource tests from spring-context-tests to spring-tests submodule * deleted submodule created for this article, since it was moved
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
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;
|
||||
|
||||
public String retrievePropertyOne() {
|
||||
return propertyOne;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user