Skip to content

๐Ÿž Board > Rest Client: ์ž„ํฌํŠธ, Non-static ์ „ํ™˜ ๋“ฑ Nettee Client์˜ ์ˆ˜์ •์ด ๋œ ๋ฐ˜์˜๋œ ์˜์—ญ์„ ์ˆ˜์ • #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

silberbullet
Copy link
Contributor

Issues

Description

  • ๋ณ€๊ฒฝ๋œ Nettee Client์— ๋งž์ถ”์–ด ์ปดํŒŒ์ผ ์—๋Ÿฌ๋ฅผ ํ•ด๊ฒฐํ•ฉ๋‹ˆ๋‹ค.

Review Points

  • Client Properties๊ฐ€ yml ํŒŒ์ผ์—์„œ ๊ฐ’์„ ๊ฐ€์ ธ์˜ฌ ์‹œ, ๋ฌธ์ž์—ด ๋‚ด์— ๊ณต๋ฐฑ์€ ์ œ๊ฑฐํ•˜๋„๋ก ์ˆ˜์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.
@Slf4j
@ConfigurationProperties("app.client")
public record ClientProperties(
        String baseUrl,
        Map<String, String> url
) {
    public ClientProperties {
        if (baseUrl == null || baseUrl.isEmpty()) {
            baseUrl = "http://localhost:8080";
            log.warn("baseUrl is null or empty");
        } else {
            baseUrl = baseUrl.strip();
        }

        log.debug("baseUrl url: {}", baseUrl);

        for (Entry<String, String> entry : url.entrySet()) {
            entry.setValue(entry.getValue().strip());
            log.debug((entry.getKey() + ": " + entry.getValue()));
        }
    }
}

How Has This Been Tested?

  • No test

Additional Notes

๐Ÿฆ‰ Nettee Client๋Š” ์ด๋ ‡๊ฒŒ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”!

  1. Nettee Client๋Š” ์‹ฑ๊ธ€ํ†ค์„ ๊ธฐ๋ฐ˜ํ•˜์—ฌ Bean ์ฃผ์ž…์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
@Component
@RequiredArgsConstructor
public class SampleCommandNetteeClientAdapter implements SampleCommandNetteeClientPort {
    // โ— Bean ์ฃผ์ž…์ด ํ•„์š”
    private final NetteeClient netteeClient;

    .....
}
  1. Nette Client Adapter๋Š” ํƒ€ ๋„๋ฉ”์ธ ํ˜ธ์ถœ ์‹œ, {๋„๋ฉ”์ธ}api์˜์กด์„ ์ถ”์ฒœ๋“œ๋ฆฝ๋‹ˆ๋‹ค.
// ์˜ˆ์‚ฌ
dependencies {
    api(project(boardApi))
    api(project(":rest-client"))
}

Copy link
Member

@merge-simpson merge-simpson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๐Ÿ‘ ๊น”๋”ํ•˜๊ฒŒ ์ž˜ ์ˆ˜์ •ํ•ด ์ฃผ์…จ์Šต๋‹ˆ๋‹ค.

์ž˜ ์ˆ˜์ •๋œ ๊ฒƒ ๊ฐ™๊ณ ,
NetteeClient ์‚ฌ์šฉ์„ ์œ„ํ•œ ์„ค๋ช…๋„ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

ํŒ€ ๋‚ด ์˜จ๋ณด๋”ฉ ๋ฌธ์„œ ์ž‘์„ฑ์— ์ž˜ ์ฐธ๊ณ ํ•  ์ˆ˜ ์žˆ์–ด ๋ณด์ด๋„ค์š” ๐Ÿ‘


๐Ÿš€ ๐Ÿ… Approve !

@merge-simpson merge-simpson added the review: ing Reviews are in progress and taking time label May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
โญ๏ธ Hot Place in: board Issues in the board module in: core Issues in core modules review: ing Reviews are in progress and taking time type: bug A general bug type: refactor A code refactoring
Projects
None yet
2 participants