change package to com.baeldung
This commit is contained in:
parent
8d11845d5b
commit
1888a2f7e8
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.properties;
|
package com.baeldung.properties.conversion;
|
||||||
|
|
||||||
public class Employee {
|
public class Employee {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.properties;
|
package com.baeldung.properties.conversion;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
|
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
|
||||||
import org.springframework.core.convert.converter.Converter;
|
import org.springframework.core.convert.converter.Converter;
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.baeldung.properties.conversion;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@ComponentScan(basePackageClasses = { PropertyConversion.class, EmployeeConverter.class })
|
||||||
|
public class PropertiesConversionApplication {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(PropertiesConversionApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.properties;
|
package com.baeldung.properties.conversion;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
|
@ -8,9 +8,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
@ComponentScan(basePackageClasses = {ConfigProperties.class,
|
@ComponentScan(basePackageClasses = {ConfigProperties.class,
|
||||||
JsonProperties.class,
|
JsonProperties.class,
|
||||||
CustomJsonProperties.class,
|
CustomJsonProperties.class,
|
||||||
AdditionalConfiguration.class,
|
AdditionalConfiguration.class})
|
||||||
PropertyConversion.class,
|
|
||||||
EmployeeConverter.class})
|
|
||||||
public class ConfigPropertiesDemoApplication {
|
public class ConfigPropertiesDemoApplication {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new SpringApplicationBuilder(ConfigPropertiesDemoApplication.class).initializers(new JsonPropertyContextInitializer())
|
new SpringApplicationBuilder(ConfigPropertiesDemoApplication.class).initializers(new JsonPropertyContextInitializer())
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.properties;
|
package com.baeldung.properties.conversion;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
||||||
|
@ -12,8 +12,11 @@ import org.springframework.test.context.TestPropertySource;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
import org.springframework.util.unit.DataSize;
|
import org.springframework.util.unit.DataSize;
|
||||||
|
|
||||||
|
import com.baeldung.properties.conversion.PropertiesConversionApplication;
|
||||||
|
import com.baeldung.properties.conversion.PropertyConversion;
|
||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(classes = ConfigPropertiesDemoApplication.class)
|
@SpringBootTest(classes = PropertiesConversionApplication.class)
|
||||||
@TestPropertySource("classpath:conversion.properties")
|
@TestPropertySource("classpath:conversion.properties")
|
||||||
public class PropertiesConversionIntegrationTest {
|
public class PropertiesConversionIntegrationTest {
|
||||||
|
|
Loading…
Reference in New Issue