Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alfa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
alfa
Commits
d817a33d
Commit
d817a33d
authored
3 months ago
by
Krzysztof Witukiewicz
Browse files
Options
Downloads
Patches
Plain Diff
OZG-3936 OZG-7793 Autowire instead of constructor injection
parent
eac0f4df
No related branches found
No related tags found
1 merge request
!16
Ozg 3936 refactor user profile url provider
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
alfa-service/src/main/java/de/ozgcloud/alfa/common/LinkedUserProfileResourceSerializer.java
+5
-2
5 additions, 2 deletions
...loud/alfa/common/LinkedUserProfileResourceSerializer.java
with
5 additions
and
2 deletions
alfa-service/src/main/java/de/ozgcloud/alfa/common/LinkedUserProfileResourceSerializer.java
+
5
−
2
View file @
d817a33d
...
...
@@ -28,6 +28,7 @@ import java.lang.reflect.InvocationTargetException;
import
java.util.Collection
;
import
org.apache.commons.lang3.reflect.ConstructorUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.hateoas.Link
;
import
org.springframework.stereotype.Component
;
...
...
@@ -44,16 +45,18 @@ 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
;
// for usage outside of Spring
private
LinkedUserProfileResourceSerializer
()
{
this
.
userManagerUrlProvider
=
new
UserManagerUrlProvider
(
new
UserManagerProperties
());
this
(
new
UserManagerUrlProvider
(
new
UserManagerProperties
())
)
;
}
p
ublic
LinkedUserProfileResourceSerializer
(
UserManagerUrlProvider
userManagerUrlProvider
)
{
p
rivate
LinkedUserProfileResourceSerializer
(
UserManagerUrlProvider
userManagerUrlProvider
)
{
this
.
userManagerUrlProvider
=
userManagerUrlProvider
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment