{"id":27417441,"url":"https://github.com/reddevilmidzy/java-template","last_synced_at":"2026-01-21T08:11:45.836Z","repository":{"id":214987488,"uuid":"730767148","full_name":"reddevilmidzy/java-template","owner":"reddevilmidzy","description":"미션 템플릿","archived":false,"fork":false,"pushed_at":"2024-01-01T16:39:06.000Z","size":45,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T16:39:09.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reddevilmidzy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-12T16:19:09.000Z","updated_at":"2024-10-23T12:16:37.000Z","dependencies_parsed_at":"2024-01-01T18:48:10.379Z","dependency_job_id":null,"html_url":"https://github.com/reddevilmidzy/java-template","commit_stats":null,"previous_names":["reddevilmidzy/java-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reddevilmidzy/java-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddevilmidzy%2Fjava-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddevilmidzy%2Fjava-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddevilmidzy%2Fjava-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddevilmidzy%2Fjava-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reddevilmidzy","download_url":"https://codeload.github.com/reddevilmidzy/java-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reddevilmidzy%2Fjava-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28629922,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-14T09:55:09.622Z","updated_at":"2026-01-21T08:11:45.822Z","avatar_url":"https://github.com/reddevilmidzy.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# java-template\n\n**코드 템플릿**\n\n* **Controller**\n\t* [Controller](#controller)\n\t* [InputController](#inputcontroller)\n* **View**\n\t* [InputView](#inputview)\n\t* [OutputView](#outputview)\n\t* [number comma](#comma)\n \t* [iterator](#iterator) \n* **Constant**\n\t* [ErrorMessage](#errormessge)\n* **Model**\n\t* [equals](#equals)\n\t* [hashCode](#hashcode)\n\t* [map foreach](#map-foreach)\n\t* [list foreach](#list-foreach)\n \t* [enum static method](#valueof)\n* **Validate**\n\t* [Regax](#regax)\n\t* [Separator](#separator)\n\t* [Range](#range)\n\n\n\n\u003cbr\u003e\n\n## 구현 기능 목록 템플릿\n\n```text\n# 구현 기능 목록\n\n\n## 기능\n\n\n\n## 입력\n\n\n\n## 출력\n\n\n\n## 예외\n\n\n```\n\n\u003cbr\u003e\n\n## Controller\n\n```java\nprivate final InputController inputController;\nprivate final OutputView outputView;\n```\n\n\u003cbr\u003e\n\n```java\npublic Controller(InputController inputController, OutputView outputView) {\n    this.inputController = inputController;\n    this.outputView = outputView;\n}\n\npublic void run() {\n}\n```\n\n\u003cbr\u003e\n\n## InputController\n\n```java\n\n    private final InputView inputView;\n    private final OutputView outputView;\n\n\n    public InputController(InputView inputView, OutputView outputView) {\n        this.inputView = inputView;\n        this.outputView = outputView;\n    }\n\n\tpublic Object getXX() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn readXX();\n\t\t\t} catch (IllegalArgumentException exception) {\n                outputView.printErrorMessage(exception);\n            }\n\t\t}\n\t}\n\n\tprivate Object readXX() {\n\t\tString value = inputView.readXX();\n\t\treturn XX.from(value);\n\t}\n\n```\n\n\u003cbr\u003e\n\n## InputView\n\n```java\n\n\n\n    public String readXX() {\n        System.out.println(\"blah blah\");\n        String value = readLine();\n        System.out.println();\n        return value;\n    }\n\n    protected String readLine() {\n        return Console.readLine();\n    }\n\n```\n\n\u003cbr\u003e\n\n## OutputView\n\n```java\n\n\n    public static final String ERROR_FORM = \"[ERROR] %s%n\";\n\n    public void printErrorMessage(Throwable throwable) {\n        System.out.printf(ERROR_FORM, throwable.getMessage());\n\tSystem.out.println();\n    }\n\n```\n\n\u003cbr\u003e\n\n## ErrorMessge\n\n```java\n\n\n    INVALID_XX(\"유효하지 않은 값입니다.\"),\n\n    RETRY_INPUT(\"다시 입력해 주세요.\");\n\n    private final String message;\n\n    ErrorMessage(String message) {\n        this.message = message;\n    }\n\n    public String getMessage() {\n        return message;\n    }\n\n```\n\n\u003cbr\u003e\n\n## Regax\n\n```java\npublic static final Pattern NUMERIC_PATTERN = Pattern.compile(\"^[0-9]+$\");\npublic static final Pattern KOREAN_AND_ENGLISH_PATTERN = Pattern.compile(\"^[ㄱ-ㅎ가-힣A-Za-z]+$\");\n```\n\n\u003cbr\u003e\n\n## Separator\n\n```java\nprivate static void validate(String value) {\n        if (value.trim().isEmpty()) {\n            throw new IllegalArgumentException();\n        }\n        if (value.startsWith(\",\") || value.endsWith(\",\")) {\n            throw new IllegalArgumentException();\n        }\n        if (value.contains(\",,\")) {\n            throw new IllegalArgumentException();\n        }\n    }\n```\n\n\u003cbr\u003e\n\n## Range\n\n```java\nprivate static void validate(String value) {\n\ttry {\n\t\tif (Integer.parseInt(value) \u003c 0) {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t} catch (NumberFormatException exception) {\n\t\tthrow new IllegalArgumentException();\n\t}\n}\n```\n\n\u003cbr\u003e\n\n## equals \n\n```java\n@Override\npublic boolean equals(Object obj) {\n\tif (this == obj) {\n            return true;\n        }\n        if (!(obj instanceof X target)) {\n            return false;\n        }\n\treturn // TODO:\n}\n```\n\n\u003cbr\u003e\n\n## hashCode\n\n```java\n@Override\npublic int hashCode() {\n\treturn Objects.hash(vo);\n}\n```\n\n\u003cbr\u003e\n\n## comma\n\n```java\npublic static final DecimalFormat NUMBER_FORMAT = new DecimalFormat(\"###,###\");\n\nprivate String formatted(Integer value) {\n        return NUMBER_FORMAT.format(value);\n    }\n```\n\n\u003cbr\u003e\n\n## iterator\n\n```java\nprivate void printValues(Iterator\u003cCrew\u003e iterator) {\n        while (iterator.hasNext()) {\n            System.out.print(iterator.next().getName());\n            if (iterator.hasNext()) {\n                System.out.print(\" : \");\n            }\n        }\n        System.out.println();\n    }\n```\n\n\u003cbr\u003e\n\n\n## map forEach\n\n```java\npublic void forEach(BiConsumer\u003c? super K, ? super V\u003e action) {\n        map.forEach(action);\n    }\n```\n\n\u003cbr\u003e\n\n## list forEach\n\n```java\npublic void forEach(Consumer\u003c? super T\u003e action) {\n\tlist.forEach(action);\n}\n```\n\n\u003cbr\u003e\n\n## valueof\n\n```java\n\n    public static ENUM_TYPE valueOfName(String name) {\n        return Arrays.stream(values())\n                .filter(s -\u003e s.cmd.equals(name))\n                .findFirst()\n                .orElseThrow(() -\u003e new IllegalArgumentException(ErrorMessage.));\n    }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddevilmidzy%2Fjava-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freddevilmidzy%2Fjava-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freddevilmidzy%2Fjava-template/lists"}