Skip to content
Snippets Groups Projects
Commit 47ab2175 authored by Krzysztof Witukiewicz's avatar Krzysztof Witukiewicz
Browse files

OZG-3936 OZG-7793 Use Autowired on constructor

parent d817a33d
Branches
Tags
1 merge request!16Ozg 3936 refactor user profile url provider
......@@ -45,8 +45,6 @@ import de.ozgcloud.common.errorhandling.TechnicalException;
@Component
public class LinkedUserProfileResourceSerializer extends JsonSerializer<Object> implements ContextualSerializer {
// need to autowire, because Spring calls the constructor without parameters
@Autowired
private final UserManagerUrlProvider userManagerUrlProvider;
private LinkedUserProfileResource annotation;
......@@ -56,7 +54,8 @@ public class LinkedUserProfileResourceSerializer extends JsonSerializer<Object>
this(new UserManagerUrlProvider(new UserManagerProperties()));
}
private LinkedUserProfileResourceSerializer(UserManagerUrlProvider userManagerUrlProvider) {
@Autowired
public LinkedUserProfileResourceSerializer(UserManagerUrlProvider userManagerUrlProvider) {
this.userManagerUrlProvider = userManagerUrlProvider;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment