change package to com.baeldung
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.baeldung.properties.conversion;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationPropertiesBinding;
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@ConfigurationPropertiesBinding
|
||||
public class EmployeeConverter implements Converter<String, Employee> {
|
||||
|
||||
@Override
|
||||
public Employee convert(String from) {
|
||||
String[] data = from.split(",");
|
||||
return new Employee(data[0], Double.parseDouble(data[1]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user