-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from HongDam-org/feat/bean-refactor
- Loading branch information
Showing
12 changed files
with
124 additions
and
110 deletions.
There are no files selected for viewing
50 changes: 0 additions & 50 deletions
50
backend/src/main/java/com/twtw/backend/config/client/NaverWebClientConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
backend/src/main/java/com/twtw/backend/config/mapper/CompositePropertyNamingStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.twtw.backend.config.mapper; | ||
|
||
import com.fasterxml.jackson.databind.PropertyNamingStrategy; | ||
import com.fasterxml.jackson.databind.cfg.MapperConfig; | ||
import com.fasterxml.jackson.databind.introspect.AnnotatedField; | ||
import com.fasterxml.jackson.databind.introspect.AnnotatedMethod; | ||
|
||
public class CompositePropertyNamingStrategy extends PropertyNamingStrategy { | ||
private final PropertyNamingStrategy[] strategies; | ||
|
||
public CompositePropertyNamingStrategy(final PropertyNamingStrategy... strategies) { | ||
this.strategies = strategies; | ||
} | ||
|
||
@Override | ||
public String nameForField( | ||
final MapperConfig<?> config, final AnnotatedField field, final String defaultName) { | ||
String name = defaultName; | ||
for (final PropertyNamingStrategy strategy : strategies) { | ||
name = strategy.nameForField(config, field, name); | ||
} | ||
return name; | ||
} | ||
|
||
@Override | ||
public String nameForGetterMethod( | ||
final MapperConfig<?> config, final AnnotatedMethod method, final String defaultName) { | ||
String name = defaultName; | ||
for (final PropertyNamingStrategy strategy : strategies) { | ||
name = strategy.nameForGetterMethod(config, method, name); | ||
} | ||
return name; | ||
} | ||
|
||
@Override | ||
public String nameForSetterMethod( | ||
final MapperConfig<?> config, final AnnotatedMethod method, final String defaultName) { | ||
String name = defaultName; | ||
for (final PropertyNamingStrategy strategy : strategies) { | ||
name = strategy.nameForSetterMethod(config, method, name); | ||
} | ||
return name; | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
backend/src/main/java/com/twtw/backend/config/mapper/NaverObjectMapperConfig.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
backend/src/main/java/com/twtw/backend/config/properties/PropertiesConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.twtw.backend.config.properties; | ||
|
||
import com.twtw.backend.global.properties.KakaoProperties; | ||
import com.twtw.backend.global.properties.NaverProperties; | ||
|
||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
@EnableConfigurationProperties({NaverProperties.class, KakaoProperties.class}) | ||
public class PropertiesConfig {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
backend/src/main/java/com/twtw/backend/global/client/PathClient.java
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
backend/src/main/java/com/twtw/backend/global/properties/KakaoProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.twtw.backend.global.properties; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
@ConfigurationProperties(prefix = "kakao-map") | ||
public class KakaoProperties { | ||
private final String url; | ||
private final String key; | ||
private final String headerPrefix; | ||
} |
17 changes: 17 additions & 0 deletions
17
backend/src/main/java/com/twtw/backend/global/properties/NaverProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.twtw.backend.global.properties; | ||
|
||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
@ConfigurationProperties(prefix = "naver-map") | ||
public class NaverProperties { | ||
private final String id; | ||
private final String secret; | ||
private final String url; | ||
private final String headerClientId; | ||
private final String headerClientSecret; | ||
} |