code
stringlengths
41
34.3k
lang
stringclasses
8 values
review
stringlengths
1
4.74k
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
๊ทธ ๋ถ€๋ถ„์€ ์‹ ๊ฒฝ์“ฐ์ง€ ๋ชปํ–ˆ๋„ค์š”! ํ•œ๊ตญ ์„œ๋น„์Šค์—์„œ๋Š” alt๋„ ํ•œ๊ธ€๋กœ ์ ์–ด์ฃผ๋Š”๊ฒŒ ๋” ๋‚˜์„๊นŒ์š”?
@@ -1,83 +1,112 @@ import GithubApiController from "@controllers/githubController"; import User from "@models/User"; +import { + NO_SEARCH_RESULT_TEMPLATE, + SEARCH_LOADING_TEMPLATE, + getReposTemplate, + NO_REPOS_TEMPLATE, +} from "@templates/search"; +import { SPINNER_TEMPLATE } from "@templates/spinner"; +impo...
JavaScript
๊ธฐ์กด vs ์ƒˆ๋กœ ์ƒ์„ฑ์€ ๋‹ค๋ฅธ ๊ฒฝ์šฐ๋‹ˆ๊นŒ create๊ฐ€ ๋” ๋ช…ํ™•ํ•˜๊ฒ ๋„ค์š” :)
@@ -0,0 +1,65 @@ +import History from "@models/History"; +import { + getHistoryItemTemplate, + NO_HISTORY_TEMPLATE, +} from "@templates/history"; + +export default class HistoryController { + constructor(historyContainer) { + this.historyContainer = historyContainer; + this.numberOfHistory = 0; + this._init...
JavaScript
๊ฐ„๊ฒฐํ•œ ๋ฒ„์ „๋„ ๊ดœ์ฐฎ๊ตฐ์š” ใ…Žใ…Ž
@@ -1,11 +1,13 @@ import Repo from "@models/Repo"; +import { getDateDiff } from "@utils/dateUtils"; export default class User { constructor({ id, avatar_url, created_at, email, + bio, followers, following, login, @@ -22,57 +24,114 @@ export default class User { this.id ...
JavaScript
๊ฐ์ฒด ํ”„๋กœํผํ‹ฐ๋ฅผ ๋ณต์‚ฌํ•ด์˜ค๋Š” ๊ณผ์ •์—์„œ ๋‹ค๋ฅธ ๋ถ€๋ถ„์€ ์‹ ๊ฒฝ์„ ์“ฐ์ง€ ๋ชปํ–ˆ๋„ค์š”...! ํ†ต์ผ ์‹œ์ผœ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
๋„ต~ ์ œ๊ฐ€ ์ง€๊ธˆ ์ง„ํ–‰ํ•˜๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์˜ ๊ฒฝ์šฐ ๋‹ค ํ•œ๊ธ€๋กœ alt ์ ์–ด์ฃผ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค!
@@ -19,41 +19,56 @@ export default class Repo { }) { this.id = id; this.name = name; - this.full_name = full_name; + this.fullName = full_name; this.owner = owner; - this.html_url = html_url; + this.htmlUrl = html_url; this.description = description; - this.stargazers_count = starg...
JavaScript
์•„ํ•˜! ์ฐธ๊ณ ํ•ด์„œ ์ง„ํ–‰ํ•ด๋ณด๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~
@@ -1,70 +1,10 @@ -# Getting Started with Create React App +# React Westagram 3ํŒ€ -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +instagram์„ ๋ชจํ‹ฐ๋ธŒ๋กœ ํ•œ ํด๋ก  ํŒ€ ํ”„๋กœ์ ํŠธ -## Available Scripts +# ํŒ€์› -In the project directory, you can run: - -### `npm start` - -Runs the app...
Unknown
๐Ÿ‘ README.md ํŒŒ์ผ ์ˆ˜์ •ํ•ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค ^^
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๋” ์ด์ƒ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š” ๋ถˆํ•„์š”ํ•œ ์ฝ”๋“œ์— ๋Œ€ํ•œ ์ฃผ์„์€ ๊ผญ ์‚ญ์ œํ•ด์ฃผ์„ธ์š”
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
์ฝ˜์†”๋„ ๋งˆ์ฐฌ๊ฐ€์ง€์ž…๋‹ˆ๋‹ค ํ…Œ์ŠคํŠธ๊ฐ€ ๋๋‚œ ์ฝ”๋“œ๋Š” ํ•ญ์ƒ ์ง€์›Œ์ฃผ์„ธ์š”! ์•„๋ž˜์— ๋‚จ์•„์žˆ๋Š” ๋ชจ๋“  ์ฝ˜์†”์€ ์‚ญ์ œ ํ•ด์ฃผ์„ธ์š”
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๐Ÿ‘ useEffect ๊นŒ์ง€ ํ™œ์šฉํ•ด๋ณด์…จ๊ตฐ์š”! condition ๋ณ€์ˆ˜๊ฐ€ userInfo๋ผ๋Š” state๋ฅผ ์ด๋ฏธ ์ฐธ์กฐํ•œ ๊ฐ’์ด๊ธฐ๋•Œ๋ฌธ์— isActive๋ผ๋Š” ๊ฐ’์„ ๋”ฐ๋กœ state๋กœ ๊ด€๋ฆฌํ•˜์ง€์•Š์•„๋„ condition ๋ณ€์ˆ˜๊ฐ€ ์ฐธ์กฐํ•˜๊ณ ์žˆ๋Š” ๊ฐ’์ด ์ด๋ฏธ state๋ผ์„œ state๋ณ€ํ™”์— ๋”ฐ๋ผ ์ฆ‰๊ฐ์ ์œผ๋กœ ๋‹ค๋ฅธ ๊ฐ’์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. isActive๋ฅผ state๊ฐ€ ์•„๋‹Œ ์ผ๋ฐ˜๋ณ€์ˆ˜๋กœ ๊ด€๋ฆฌํ•ด๋ณด์‹œ๋Š”๊ฒŒ ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,61 @@ +import React, { useState, useEffect } from "react"; +import { useNavigate } from "react-router-dom"; +import "./Login.scss"; + +const Login = () => { + const navigate = useNavigate(); + const [showErrorMessage, setShowErrorMessage] = useState(false); + + const [userInfo, setUserInfo] = useState({ +...
Unknown
๐Ÿ‘ ์กฐ๊ฑด๋ถ€๋žœ๋”๋ง ํ™œ์šฉํ•ด๋ณด์…จ๊ตฐ์š”!! ์˜คํžˆ๋ ค showErrorMessage๋ฅผ ๊ด€๋ฆฌํ•˜๋Š” ํ•จ์ˆ˜๋ฅผ useEffectํ•จ์ˆ˜ ๋‚ด์—์„œ ์„ ์–ธํ•œ condition๊ฐ’์— ๋”ฐ๋ผ ๋‹ค๋ฅด๊ฒŒ ๊ด€๋ฆฌํ•ด๋ณผ ์ˆ˜ ์žˆ๊ฒ ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,144 @@ +.login { + width: 100%; + height: 100vh; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + + .box { + padding: 25px 40px; + display: flex; + flex-direction: column; + align-items: center; + width: 100%; + max-width: 350px; + box...
Unknown
์›นํฐํŠธ ๊ฐ™์€๊ฒฝ์šฐ๋Š” index.htmlํŒŒ์ผ์—์„œ ์ถ”๊ฐ€ํ•  ์ˆ˜๋„ ์žˆ๊ณ  common.scss์—์„œ ๊ด€๋ฆฌํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
reset.scss ํŒŒ์ผ๋„ ๋งˆ์ฐฌ๊ฐ€์ง€๋กœ ์ „์—ญ์—์„œ ์ ์šฉ๋˜์–ด์•ผ ํ•˜๋Š” ํŒŒ์ผ์ž„์œผ๋กœ index.js์—์„œ importํ•ด ์˜ค๋Š”๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
์•„์ด์ฝ˜๋“ค์„ ๋ˆŒ๋ €์„๋•Œ ํŠน์ •ํŽ˜์ด์ง€๋กœ ์ด๋™ํ•ด์•ผํ•˜๋Š”๊ฒƒ์ด ์•„๋‹ˆ๋ผ๋ฉด a ํƒœ๊ทธ๋‚˜ Link ํƒœ๊ทธ๊ฐ€ ์•„๋‹Œ ์—ฌํƒ€ ๋‹ค๋ฅธํƒœ๊ทธ๋ฅผ ํ™œ์šฉํ•ด์„œ ๊ธฐ๋Šฅ์„ ๊ตฌํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
ํ•ด๋‹น ์ƒ๋Œ€๊ฒฝ๋กœ๊ฐ€ publicํด๋”๋ฅผ ์ฐธ๊ณ ํ•˜๋Š”๊ฑฐ๋ผ๋ฉด ```suggestion <img alt="๊ณ„์ • ํ”„๋กœํ•„ ์‚ฌ์ง„" src="/images/jisun/img_profile.png" /> ``` ์ด๋ ‡๊ฒŒ ํ‘œํ˜„ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,160 @@ +import React from "react"; +import "./Main.scss"; +import { Link, useNavigate } from "react-router-dom"; + +const Main = () => { + const navigate = useNavigate(); + + const goToMain = () => { + navigate("/jisun-main"); + }; + + return ( + <div className="main"> + <nav> + <Link t...
Unknown
className์ด ๋„ˆ๋ฌด ๋ชจํ˜ธํ•ฉ๋‹ˆ๋‹ค!! ์–ด๋–ค ์•„์ด์ฝ˜์ธ์ง€ ์•Œ๋ ค์ฃผ์„ธ์š”
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re List<ReviewPhoto> reviewPhotoList = new ArrayList<>(); List<String> photoUrls = new ArrayList<>(); + if(reviewPhotos == null) return reviewPhotoList; reviewPhotos.forEach(multipartFile ...
Java
์ด ๋ถ€๋ถ„์€ ์–ด๋–ค ์˜๋ฏธ์ธ๊ฐ€์š”?
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re List<ReviewPhoto> reviewPhotoList = new ArrayList<>(); List<String> photoUrls = new ArrayList<>(); + if(reviewPhotos == null) return reviewPhotoList; reviewPhotos.forEach(multipartFile ...
Java
์ด ๋ถ€๋ถ„์€ ์–ด๋–ค ์˜๋ฏธ์ธ๊ฐ€์š”?
@@ -0,0 +1,34 @@ +package com.luckytree.shop.utils; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Type;...
Java
์ด ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ณณ์ด ์–ด๋”˜๊ฐ€์š”?
@@ -32,12 +32,11 @@ public class ReviewController { private final ReviewUseCase reviewUseCase; @Operation(summary = "๋ฆฌ๋ทฐ ๋“ฑ๋ก") - @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + @PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) public Res...
Java
๋ฆฌํ€˜์ŠคํŠธ๋ฐ”๋””๊ฐ€ ์‚ฌ๋ผ์กŒ๋Š”๋ฐ, ์ด ๊ฒฝ์šฐ์—๋„ ํด๋ผ์ด์–ธํŠธ์—์„œ JSON ํ˜•์‹์˜ Body ํƒœ๊ทธ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ›์•„์˜ค๋Š” ๋ฐ์— ๋ฌธ์ œ๊ฐ€ ์—†๋‚˜์š”?
@@ -78,6 +78,7 @@ public List<ReviewPhoto> createReviewPhoto(Long reviewId, List<MultipartFile> re List<ReviewPhoto> reviewPhotoList = new ArrayList<>(); List<String> photoUrls = new ArrayList<>(); + if(reviewPhotos == null) return reviewPhotoList; reviewPhotos.forEach(multipartFile ...
Java
๋ฆฌ๋ทฐ ์ƒ์„ฑ ์‹œ ํฌํ† ๋ฅผ ์„ ํƒํ•˜์ง€ ์•Š์•„๋„ ์ด ์„œ๋น„์Šค๊ฐ€ ์‹คํ–‰๋˜์–ด์„œ ์„ ํƒ๋˜์ง€ ์•Š์•˜์„ ๋•Œ ๋ฐ”๋กœ ๋น ์ ธ๋‚˜๊ฐ€๊ฒŒ ํ•œ๊ฒ๋‹ˆ๋‹ค
@@ -0,0 +1,34 @@ +package com.luckytree.shop.utils; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Type;...
Java
swagger์—์„œ ๋ฆฌ๋ทฐ ์ƒ์„ฑ API์— multipartfile์„ ์‚ฌ์šฉํ•ด์„œ ๊ทธ๊ฑฐ ์‚ฌ์šฉํ•˜๊ฒŒ ๋งŒ๋“ค์–ด์ฃผ๋Š” ํด๋ž˜์Šค์ž…๋‹ˆ๋‹ค
@@ -32,12 +32,11 @@ public class ReviewController { private final ReviewUseCase reviewUseCase; @Operation(summary = "๋ฆฌ๋ทฐ ๋“ฑ๋ก") - @PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + @PostMapping(consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}) public Res...
Java
swagger๋ž‘ postman์—์„œ ํ™•์ธํ–ˆ๊ณ  ์˜คํžˆ๋ ค ๋ฆฌํ€˜์ŠคํŠธ๋ฐ”๋””๋ฅผ ์ผ์„ ๋•Œ ์•ˆ๋ผ์„œ ๋ฐ”๊ฟจ์Šต๋‹ˆ๋‹ค. ์ด์œ ๋Š” ์ฐพ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,43 @@ +// +// PopcornOrangeButton.swift +// Popcorn-iOS +// +// Created by ์ œ๋ฏผ์šฐ on 1/12/25. +// + +import UIKit + +final class PopcornOrangeButton: UIButton { + init(text: String, isEnabled: Bool) { + super.init(frame: .zero) + configureInitialSetting(isEnabled: isEnabled) + configu...
Swift
์ €๋„ ์กฐ๋งŒ๊ฐ„ ์ด๊ฑธ๋กœ ๋ฆฌํŒฉํ† ๋งํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!!
@@ -0,0 +1,425 @@ +// +// WriteReviewViewController.swift +// Popcorn-iOS +// +// Created by ์ œ๋ฏผ์šฐ on 1/12/25. +// + +import PhotosUI +import UIKit + +final class WriteReviewViewController: UIViewController { + private let viewModel = WriteReviewViewModel() + + private let popupMainImageView: UIImageView = { + ...
Swift
๋””์ž์ธ์ด ์ถ”๊ฐ€๋˜์–ด์•ผํ•˜์ง€๋งŒ.. ์–ผ๋Ÿฟ์œผ๋กœ ํ‘œ์‹œ๋˜๋Š”๊ฑฐ๋ณด๋‹ค x๋ฒ„ํŠผ์ด ์žˆ๋Š”๊ฒŒ ์–ด๋–จ๊นŒ์š”? ์‚ฌ์šฉ์ž ์ž…์žฅ์—์„œ ์ด๋ฏธ์ง€๋ฅผ ์ดˆ๊ธฐํ™” ํ•˜๊ณ ์‹ถ์„ ๋•Œ ์‚ฌ์ง„์„ ํ„ฐ์น˜ํ•˜๋ฉด ์ด๋ฏธ์ง€ ์ดˆ๊ธฐํ™”๋ฅผ ํ•œ๋‹ค๋Š”๊ฑธ ๋– ์˜ฌ๋ฆฌ๊ธฐ๊ฐ€ ์–ด๋ ค์šธ๊ฑฐ ๊ฐ™์•„์„œ์š”!
@@ -0,0 +1,43 @@ +// +// PopcornOrangeButton.swift +// Popcorn-iOS +// +// Created by ์ œ๋ฏผ์šฐ on 1/12/25. +// + +import UIKit + +final class PopcornOrangeButton: UIButton { + init(text: String, isEnabled: Bool) { + super.init(frame: .zero) + configureInitialSetting(isEnabled: isEnabled) + configu...
Swift
๋„ต! ๋‚˜์ค‘์— ํ™”๋ฉด ์—ฐ๊ฒฐ ์‹œ ๋‚ด๋น„๊ฒŒ์ด์…˜ ๋ฐ” ๊ตฌํ˜„ํ•˜๋ ค๊ณ  ํ•˜์˜€์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,425 @@ +// +// WriteReviewViewController.swift +// Popcorn-iOS +// +// Created by ์ œ๋ฏผ์šฐ on 1/12/25. +// + +import PhotosUI +import UIKit + +final class WriteReviewViewController: UIViewController { + private let viewModel = WriteReviewViewModel() + + private let popupMainImageView: UIImageView = { + ...
Swift
์‹ค์ˆ˜๋กœ ์ธํ•ด ์‚ฌ์ง„์ด ์‚ญ์ œ๋˜๋Š” ๊ฒƒ์„ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด ์–ผ๋Ÿฟ์œผ๋กœ ํ‘œ์‹œํ•˜์—ฌ ํ™•์ธ์„ ๋‹ค์‹œ ํ•  ์ˆ˜ ์žˆ๋„๋ก ์˜๋„ํ•˜์˜€์Šต๋‹ˆ๋‹ค! ๋””์ž์ด๋„ˆ๋‹˜๊ณผ ๋‹ค์‹œ ํ•œ ๋ฒˆ ์ƒ์˜ํ•ด๋ด์•ผ๊ฒ ๋„ค์š”!!
@@ -0,0 +1,15 @@ +import { useQuery } from '@tanstack/react-query'; + +import getTempleReviews from './axios'; +import { ReviewsResponse } from './type'; + +const useGetTempleReviews = (templestayId: string, page: number) => { + const { data, isLoading, isError } = useQuery<ReviewsResponse>({ + queryKey: ['reviews'...
TypeScript
ํ˜„์žฌ ์ฟผ๋ฆฌํ‚ค๊ฐ€ reviews์™€ page๋กœ๋งŒ ์ •ํ•ด์ ธ ์žˆ์–ด์„œ ๋ชจ๋“  ํ…œํ”Œ์Šคํ…Œ์ด ๋ฆฌ๋ทฐ๊ฐ€ ๊ฐ™์€ ์ฟผ๋ฆฌํ‚ค๋ฅผ ๊ณต์œ ํ•˜๊ณ  ์žˆ์–ด์„œ queryKey: ['reviews', templestayId, page],๋กœ templestayId๋ฅผ ์ฟผ๋ฆฌํ‚ค์— ์ถ”๊ฐ€ํ•ด์ฃผ์‹œ๋ฉด ๊ฐ ํ…œํ”Œ์Šคํ…Œ์ด ๋ฆฌ๋ทฐ๋ฅผ ๊ตฌ๋ณ„ํ•  ์ˆ˜ ์žˆ์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,15 @@ +import { useQuery } from '@tanstack/react-query'; + +import getTempleReviews from './axios'; +import { ReviewsResponse } from './type'; + +const useGetTempleReviews = (templestayId: string, page: number) => { + const { data, isLoading, isError } = useQuery<ReviewsResponse>({ + queryKey: ['reviews'...
TypeScript
๋„ต ๋ฐ˜์˜ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,36 @@ +package me.misik.api.infra + +import me.misik.api.core.Chatbot +import org.springframework.beans.factory.annotation.Value +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.http.HttpHeaders +import org.springfram...
Kotlin
hoxy ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋“ฑ๋กํ•˜๋Š”๊ฑฐ๋ฉด @Value ์‚ฌ์šฉํ•ด๋„ ๋ ๊นŒ์š”? ํ˜น์€ @Qualifier๋Š” ์‚ฌ์šฉํ•  ๋นˆ ๊ฐ์ฒด ์„ ํƒ ์‹œ ์“ฐ๋Š”๊ฑธ๋กœ ์•Œ๊ณ ์žˆ๋Š”๋ฐ ํ™˜๊ฒฝ๋ณ€์ˆ˜ ๋“ฑ๋กํ•  ๋•Œ๋„ ์“ธ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ด ์žˆ๋Š”์ง€์šฉ? ๐Ÿ˜
@@ -0,0 +1,17 @@ +package me.misik.api.api + +import me.misik.api.app.ReCreateReviewFacade +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class ReviewController( +...
Kotlin
์žฌ์ƒ์„ฑ๋œ ๋ฆฌ๋ทฐ๋„ ์บ์‹ฑ์— ํ™œ์šฉํ•˜๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์€๋ฐ ์ œ๊ฐ€ #5 ํ•  ๋•Œ ์ถ”๊ฐ€ํ•ด๋ด๋„ ๋ ๊นŒ์š”? 1) ์žฌ์‚ฌ์šฉ์„ ์œ„ํ•ด DB์— ์ €์žฅ 2) ์ด๋ฏธ ๊ฐ™์€ ์œ ์ €์—๊ฒŒ ์ œ๊ณต๋œ ๋ฆฌ๋ทฐ๋Š” ๋˜ ์ œ๊ณต X ์œ„๋ฅผ ์œ„ํ•ด์„œ device id ํ—ค๋”๋ฅผ ๋ฐ›์•„์˜ค๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹น!
@@ -0,0 +1,24 @@ +# ๋ฆฌ๋ทฐ ์ƒ์„ฑ + +๋ฆฌ๋ทฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. + +## Request + +### HTTP METHOD : `GET` + +### url : `https://api.misik.me/reviews/{id}` +### Http Headers +- device-id: ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’ + `๋ฏธ๋ž˜์—๋„ ๋ณ€ํ•˜์ง€ ์•Š์•„์•ผํ•จ ์•ฑ์„ ์‚ญ์ œํ–ˆ๋‹ค ๋‹ค์‹œ ๊น”์•„๋„ ์•ˆ๋ณ€ํ•˜๋Š” ๊ฐ’์œผ๋กœ ์ค„ ์ˆ˜ ์žˆ๋Š”์ง€` + +### Response + +#### `Response Status 200 OK` + +```json +{ + "isSuccess": true, // ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ...
Unknown
์ด ๋ถ€๋ถ„ ๋‹ค์Œ ์—”์ง€๋‹ˆ์–ด ํšŒ์˜ ๋•Œ ํด๋ผ์ด์–ธํŠธ ๋ถ„๋“ค๊ณผ ์ด์•ผ๊ธฐ ํ•ด๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”? ๐Ÿ˜ ์•ž์œผ๋กœ๋„ ๋น„์Šทํ•œ ์กฐํšŒ ๋กœ์ง์„ ์œ„ํ•ด ํ•ฉ์˜ํ•ด๋‘๋ฉด ์ข‹์„๋“ฏ์š”! ์ง€๊ธˆ์ฒ˜๋Ÿผ ์กฐํšŒํ•  ๋•Œ ๊ฐ’์ด ์—†์œผ๋ฉด 200์„ ์ฃผ๊ณ  ํ•„๋“œ๋กœ ๊ตฌ๋ถ„ํ•˜๊ฒŒ ํ•  ๊ฒƒ์ธ์ง€, ์•„๋‹ˆ๋ฉด 400์„ ๋‚ด๋ ค์ค„์ง€์— ๋Œ€ํ•ด์„œ์šฉ!
@@ -0,0 +1,17 @@ +package me.misik.api.api + +import me.misik.api.app.ReCreateReviewFacade +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class ReviewController( +...
Kotlin
hoxy ์—ฌ๊ธฐ ๋ฉ”์„œ๋“œ๋ช…์ด reCreateReview๊ฐ€ ์•„๋‹Œ createReview์ธ๋ฐ ์˜๋„ํ•˜์‹ ๊ฑธ๊นŒ์š”? ๐Ÿฅณ
@@ -0,0 +1,24 @@ +# ๋ฆฌ๋ทฐ ์ƒ์„ฑ + +๋ฆฌ๋ทฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. + +## Request + +### HTTP METHOD : `GET` + +### url : `https://api.misik.me/reviews/{id}` +### Http Headers +- device-id: ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’ + `๋ฏธ๋ž˜์—๋„ ๋ณ€ํ•˜์ง€ ์•Š์•„์•ผํ•จ ์•ฑ์„ ์‚ญ์ œํ–ˆ๋‹ค ๋‹ค์‹œ ๊น”์•„๋„ ์•ˆ๋ณ€ํ•˜๋Š” ๊ฐ’์œผ๋กœ ์ค„ ์ˆ˜ ์žˆ๋Š”์ง€` + +### Response + +#### `Response Status 200 OK` + +```json +{ + "isSuccess": true, // ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ...
Unknown
๐Ÿ‘ ๋„˜ ์ข‹์•„์š”! streaming ๋ฐฉ์‹ ์ง€์›ํ• ๊ฑฐ๋ผ์„œ ์ƒ์„ฑ์‹œ ๋ฆฌ๋ทฐ id๋งŒ ๋ฐ˜ํ™˜ํ•˜๊ณ , id๋กœ ์—ฌ๋Ÿฌ ๋ฒˆ ์กฐํšŒํ•ด์˜ค๊ฒŒ ํ•˜๊ธฐ!! ์ข‹์Šต๋‹ˆ๋‹น!!
@@ -0,0 +1,65 @@ +package me.misik.api.core + +import kotlinx.coroutines.flow.Flow +import me.misik.api.domain.Review +import org.springframework.web.bind.annotation.RequestBody +import org.springframework.web.service.annotation.PostExchange + +fun interface Chatbot { + + @PostExchange("/testapp/v1/chat-completions/...
Kotlin
HTTP Interface ๐Ÿ‘ ๊ฐ€๋…์„ฑ ์งฑ์ด๋„ค์šฉ
@@ -0,0 +1,24 @@ +# ๋ฆฌ๋ทฐ ์ƒ์„ฑ + +๋ฆฌ๋ทฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. + +## Request + +### HTTP METHOD : `GET` + +### url : `https://api.misik.me/reviews/{id}` +### Http Headers +- device-id: ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’ + `๋ฏธ๋ž˜์—๋„ ๋ณ€ํ•˜์ง€ ์•Š์•„์•ผํ•จ ์•ฑ์„ ์‚ญ์ œํ–ˆ๋‹ค ๋‹ค์‹œ ๊น”์•„๋„ ์•ˆ๋ณ€ํ•˜๋Š” ๊ฐ’์œผ๋กœ ์ค„ ์ˆ˜ ์žˆ๋Š”์ง€` + +### Response + +#### `Response Status 200 OK` + +```json +{ + "isSuccess": true, // ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ...
Unknown
์•„ ์ด๊ฒŒ 60์ดˆ ๋Œ€๊ธฐ๋•Œ๋ฌธ์— ์ถ”๊ฐ€๋œ๊ฑฐ๊ตฐ์š”! 1. ๋ฆฌ๋ทฐ ์ƒ์„ฑ ์ค‘, ์•„์ง ๋œ ์ƒ์„ฑ๋จ 2. ์•„์˜ˆ ์—†๋Š” ๋ฆฌ๋ทฐid๋ฅผ ์กฐํšŒํ•˜๋ ค๊ณ  ํ•จ 3. ๋ฆฌ๋ทฐ ์ƒ์„ฑ๋จ, ์กฐํšŒ ๊ฐ€๋Šฅ ์ด๋ ‡๊ฒŒ 3๊ฐ€์ง€ ๊ฒฝ์šฐ๊ฐ€ ์žˆ์–ด๋ณด์—ฌ์š”!
@@ -0,0 +1,36 @@ +package me.misik.api.infra + +import me.misik.api.core.Chatbot +import org.springframework.beans.factory.annotation.Value +import org.springframework.context.annotation.Bean +import org.springframework.context.annotation.Configuration +import org.springframework.http.HttpHeaders +import org.springfram...
Kotlin
์˜ค ์˜คํƒ€์ž…๋‹ˆ๋‹ค! ใ…‹ใ…‹ใ…‹ใ…‹ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค [b838a91](https://github.com/Nexters/misik-api/pull/7/commits/b838a916d60cf5b000f306c15caf7652e9ee0082)
@@ -0,0 +1,17 @@ +package me.misik.api.api + +import me.misik.api.app.ReCreateReviewFacade +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class ReviewController( +...
Kotlin
๋„ต ๋‹น์—ฐํ•˜์ฃต ์ˆ˜์ •ํ•ด์ฃผ์…”๋„ ๋ฉ๋‹ˆ๋‹ค! ์ถ”๊ฐ€๋กœ, ๊ตฌํ˜„ํ•˜๋ฉด์„œ ์ถœ์‹œ์ „์— ํ•ด์•ผํ• ๊ฑฐ ๊ฐ™์€ ์บ์‹ฑ์„ ๋ฐœ๊ฒฌํ–ˆ๋Š”๋ฐ์š”. ํ˜„์žฌ๋Š” ๋ฆฌ๋ทฐ๋ฅผ ์ƒ์„ฑํ• ๋•Œ, streaming๋ฐฉ์‹์œผ๋กœ DB์— ํ•˜๋‚˜์”ฉ ์ ์žฌ๋ฅผ ํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ์ฆ‰, ์ฟผ๋ฆฌ๊ฐ€ streaming์˜ ์‘๋‹ต๊ฐฏ์ˆ˜ ๋งŒํผ ๋‚˜๊ฐ€๊ณ , ์œ„ ์‚ฌ์ง„์—์„œ๋Š” ์ด 77๋ฒˆ ์ฟผ๋ฆฌ๊ฐ€ ์ˆ˜ํ–‰๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ ‡๊ฒŒ ๋กœ์ง์„ ์งœ๋Š”๊ฑด DB์— ๋ถ€๋‹ด์ด ๋˜๊ณ , ์„ฑ๋Šฅ๋„ ๋‚˜์˜ค๊ธฐ ํž˜๋“œ๋‹ˆ ์“ฐ๊ธฐ ์บ์‹ฑ์„ ํ•ด์•ผํ• ๊ฑฐ ๊ฐ™์•„์š”. ๋‘๊ฐ€์ง€ ํ”Œ๋กœ์šฐ์— ๋ ˆ๋””์Šค ํ˜น์€ ์ธ๋ฉ”๋ชจ๋ฆฌ๋กœ ์บ์‹ฑ์„ ์ถ”๊ฐ€ํ•ด์•ผํ• ๊ฑฐ ๊ฐ™์€๋ฐ์š”. 1. ์‹ค์‹œ๊ฐ„ ํด๋ง ๋ฆฌ๋ทฐ ์กฐํšŒ (1์ฐจ MVP์—์„œ๋Š” ์—†์Œ) -> redis์—...
@@ -0,0 +1,24 @@ +# ๋ฆฌ๋ทฐ ์ƒ์„ฑ + +๋ฆฌ๋ทฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. + +## Request + +### HTTP METHOD : `GET` + +### url : `https://api.misik.me/reviews/{id}` +### Http Headers +- device-id: ์‹๋ณ„ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฐ’ + `๋ฏธ๋ž˜์—๋„ ๋ณ€ํ•˜์ง€ ์•Š์•„์•ผํ•จ ์•ฑ์„ ์‚ญ์ œํ–ˆ๋‹ค ๋‹ค์‹œ ๊น”์•„๋„ ์•ˆ๋ณ€ํ•˜๋Š” ๊ฐ’์œผ๋กœ ์ค„ ์ˆ˜ ์žˆ๋Š”์ง€` + +### Response + +#### `Response Status 200 OK` + +```json +{ + "isSuccess": true, // ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ...
Unknown
๋„ต๋„ต ์„œ๋ฒ„์‚ฌ์ด๋“œ ํด๋ง (60์ดˆ ๋Œ€๊ธฐ) ๋•Œ๋ฌธ์— ์ถ”๊ฐ€๋œ ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค! ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ์„ฑ์ค‘์ด๋ฉด false, ๋ฆฌ๋ทฐ๊ฐ€ ์ƒ์„ฑ๋˜์—ˆ์œผ๋ฉด true๋ฅผ ์‘๋‹ตํ•ด์ฃผ๋ ค๊ณ  ํ•ด์š”. > ์•„์˜ˆ ์—†๋Š” ๋ฆฌ๋ทฐid๋ฅผ ์กฐํšŒํ•˜๋ ค๊ณ  ํ•จ ์—๋Ÿฌ ์‘๋‹ต์ด๋ž‘์€ ๋‹ค๋ฅธ๋‚ด์šฉ๊ฐ™์•„์„œ, ์—๋Ÿฌ ์‘๋‹ตํ…œํ”Œ๋ฆฟ์€ ๋”ฐ๋กœ ์ •์˜ํ•ด๋ณด๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค! ํ˜„์žฌ๋Š” ์—†๋Š” ๋ฆฌ๋ทฐ๋ฅผ ์กฐํšŒํ•˜๋ ค๊ณ  ํ•˜๋ฉด 400 BadRequest๋กœ ์‘๋‹ตํ•˜๊ณ  ์žˆ์”๋‹ˆ๋‹ค.
@@ -0,0 +1,17 @@ +package me.misik.api.api + +import me.misik.api.app.ReCreateReviewFacade +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class ReviewController( +...
Kotlin
์˜คํƒ€์ž…๋‹ˆ๋‹ค! ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค ๐Ÿฅณ
@@ -0,0 +1,17 @@ +package me.misik.api.api + +import me.misik.api.app.ReCreateReviewFacade +import org.springframework.web.bind.annotation.PathVariable +import org.springframework.web.bind.annotation.PostMapping +import org.springframework.web.bind.annotation.RestController + +@RestController +class ReviewController( +...
Kotlin
์กฐํšŒ, ์ƒ์„ฑ(๋ฐ ์žฌ์ƒ์„ฑ) ๋‘ ์ผ€์ด์Šค ๋‹ค ์บ์‹ฑ ๊ฐ€์‹œ์ฃ ! ๐Ÿ‘
@@ -0,0 +1,57 @@ +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class Lotto { + private final static int LOTTO_NUM_SIZE = 6; + private final List<LottoNo> lottoNums; + + public Lotto(List<LottoNo> lottoNums) { + checkSizeValid(lottoNums);...
Java
final ๋กœ ์„ ์–ธํ•˜์‹  ์ด์œ ๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค~
@@ -0,0 +1,57 @@ +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class Lotto { + private final static int LOTTO_NUM_SIZE = 6; + private final List<LottoNo> lottoNums; + + public Lotto(List<LottoNo> lottoNums) { + checkSizeValid(lottoNums);...
Java
check ๋ฉ”์„œ๋“œ๋“ค์ด public ์ธ ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”~?
@@ -0,0 +1,57 @@ +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class Lotto { + private final static int LOTTO_NUM_SIZE = 6; + private final List<LottoNo> lottoNums; + + public Lotto(List<LottoNo> lottoNums) { + checkSizeValid(lottoNums);...
Java
java 8 ์˜ stream map ์„ ์จ๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,57 @@ +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class Lotto { + private final static int LOTTO_NUM_SIZE = 6; + private final List<LottoNo> lottoNums; + + public Lotto(List<LottoNo> lottoNums) { + checkSizeValid(lottoNums);...
Java
์ ‘๊ทผ์ œ์–ด์ž๋ฅผ package-private ์œผ๋กœ ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?
@@ -0,0 +1,57 @@ +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +public class Lotto { + private final static int LOTTO_NUM_SIZE = 6; + private final List<LottoNo> lottoNums; + + public Lotto(List<LottoNo> lottoNums) { + checkSizeValid(lottoNums);...
Java
Set<LottoNo> ๋กœ ์„ ์–ธํ•˜๋Š” ๊ฒƒ์€ ์–ด๋–ป๊ฒŒ ์ƒ๊ฐํ•˜์‹œ๋‚˜์š”~
@@ -0,0 +1,46 @@ +import java.util.Objects; + +public class LottoNo implements Comparable<LottoNo> { + private final static int INVALID_NUM = 0; + public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM); + + private int lottoNumber; + + public LottoNo(int lottoNumber) { + try { + ...
Java
LottoNo ๋Š” ๋ณ€๊ฒฝ๋˜์ง€ ์•Š๋Š” lottoNumber ํ•˜๋‚˜๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์–ด์•ผํ•˜๋ฏ€๋กœ final ํ‚ค์›Œ๋“œ๋ฅผ ๋„ฃ์–ด๋„ ๋  ๊ฒƒ ๊ฐ™๋„ค์š” ใ…Žใ…Ž
@@ -0,0 +1,46 @@ +import java.util.Objects; + +public class LottoNo implements Comparable<LottoNo> { + private final static int INVALID_NUM = 0; + public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM); + + private int lottoNumber; + + public LottoNo(int lottoNumber) { + try { + ...
Java
์Œ.. RuntimeException ์„ ๋ฐœ์ƒ์‹œํ‚ค๊ณ  catch ๋ฅผ ๊ตณ์ด ํ•˜๋Š” ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”? checkedException ๊ณผ uncheckedException ์— ๋Œ€ํ•ด์„œ ๊ณต๋ถ€ํ•ด๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค~
@@ -0,0 +1,46 @@ +import java.util.Objects; + +public class LottoNo implements Comparable<LottoNo> { + private final static int INVALID_NUM = 0; + public final static LottoNo INVALID_LOTTO_NO = new LottoNo(INVALID_NUM); + + private int lottoNumber; + + public LottoNo(int lottoNumber) { + try { + ...
Java
๊ตณ์ด ๋ฉ”์„œ๋“œ๋กœ ๋นผ์ง€ ์•Š์•„๋„ ๋  ๊ฒƒ ๊ฐ™์•„์š”
@@ -0,0 +1,40 @@ +import java.util.ArrayList; +import java.util.List; + +public class LottoRankResult { + private List<Rank> ranks; + + public LottoRankResult(WinningLotto winningLotto, LottoTicket lottoTicket) { + this.ranks = new ArrayList<>(); + + for (Lotto lotto : lottoTicket.getAllLottoGames()...
Java
๋ญ”๊ฐ€ ์ด๋ฆ„์ด ๊ฒฐ๊ณผ๋ฅผ ๋‹ด๋Š” ๋ฐ์ดํ„ฐ ๊ทธ๋ฆ‡ ๊ฐ™์€ ๋А๋‚Œ์ด๋ผ LottoCalculator LottoResultCalculator LottoRankCalculator ๊ฐ™์€ ๋„ค์ด๋ฐ์œผ๋กœ ๋ณ€๊ฒฝํ•ด๋ณด๋ฉด ์–ด๋–จ๊นŒ์š”? ๊ทธ์— ๋งž์ถฐ์„œ ๋ฉ”์„œ๋“œ ๋„ค์ด๋ฐ๋„ ๋ณ€๊ฒฝํ•˜๋ฉด ๋‹จ์ˆœํžˆ set ๋œ ๋ฐ์ดํ„ฐ๋ฅผ get ํ•˜๋Š” ๊ฒƒ๋ณด๋‹ค ์ƒํƒœ์™€ ํ–‰์œ„๋ฅผ ๊ฐ–๋Š” ๊ฐ์ฒด์ง€ํ–ฅ์ ์ธ ๋„ค์ด๋ฐ์ด ๋  ๊ฒƒ ๊ฐ™๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ญ๋‹ˆ๋‹ค
@@ -0,0 +1,22 @@ +import java.util.ArrayList; +import java.util.List; + +public class Lottos { + private List<Lotto> lottos; + + public Lottos() { + this.lottos = new ArrayList<>(); + } + + public List<Lotto> getLottos() { + return lottos; + } + + public void addLotto(Lotto lotto) { + ...
Java
Lottos ๊ฐ€ ๊ฐ€์ง€๋Š” ํ–‰์œ„๊ฐ€ ํ•˜๋‚˜๋„ ์—†๋Š”๋ฐ์š”, ๋‹ค๋ฅธ ๊ฐ์ฒด์—์„œ ์œ„์ž„ํ• ๋งŒํ•œ๊ฒŒ ์—†์„๊นŒ์š”? get์ด ์‚ฌ์šฉ๋˜๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์€ Lottos ์˜ tell dont ask ์›์น™์ด ์•ˆ์ง€์ผœ์ง€๊ณ  ์žˆ๋‹ค๋Š” ๋œป์ด๊ณ , ์—ฌ๊ธฐ๋กœ ์œ„์ž„ํ• ๋งŒํ•œ ์ฑ…์ž„์ด ์‚ฐ์žฌํ•ด ์žˆ๋‹ค๋Š” ๋œป์ด๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค.
@@ -0,0 +1,29 @@ +import java.util.List; + +public class WinningLotto { + private Lotto winningLotto; + private LottoNo bonusNo; + + public WinningLotto(List<LottoNo> winningLottoNumbers, LottoNo lottoNo) { + if (winningLottoNumbers == null) { + throw new IllegalArgumentException("'lotto' mus...
Java
Lotto๋ฅผ ์ƒ์† ๋ฐ›์„ ์ˆ˜๋„ ์žˆ์—ˆ๋Š”๋ฐ ์ด๋ ‡๊ฒŒ ํ•ฉ์„ฑ์„ ์‚ฌ์šฉํ•˜์…จ๋„ค์š”. ๐Ÿ‘ ํ˜น์‹œ๋ผ๋„ ์šฐ์—ฐํžˆ ์ด๋ ‡๊ฒŒ ๊ตฌํ˜„ํ•˜์‹ ๊ฑฐ๋ผ๋ฉด, ์ƒ์†๊ณผ ํ•ฉ์„ฑ์„ ๊ตฌ๊ธ€๋ง ํ•ด๋ณด์‹œ๋ฉด ๊ด€๋ จ ์ž๋ฃŒ๋ฅผ ์ฐพ์œผ์‹ค ์ˆ˜ ์žˆ์„๊ฒ๋‹ˆ๋‹ค ~
@@ -0,0 +1,43 @@ +import java.util.Scanner; + +public class LottoApplication { + private static boolean APP_SUCCESS = false; + + public static void main(String[] args) { + runUntilAppSuccess(); + } + + public static void runUntilAppSuccess() { + while (!APP_SUCCESS) { + run(); + ...
Java
LottoGame ์ด๋ผ๋Š” ๋„ค์ด๋ฐ์€ ์–ด๋–จ๊นŒ์š”
@@ -0,0 +1,43 @@ +import java.util.Scanner; + +public class LottoApplication { + private static boolean APP_SUCCESS = false; + + public static void main(String[] args) { + runUntilAppSuccess(); + } + + public static void runUntilAppSuccess() { + while (!APP_SUCCESS) { + run(); + ...
Java
lottoService ์— set ํ•˜๊ณ  get ํ•˜๊ณ  ์ ˆ์ฐจ์ง€ํ–ฅ์ ์ธ ๋ฐฉ์‹์œผ๋กœ ์ฝ”๋“œ๊ฐ€ ์งœ์—ฌ์ ธ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ๋กœ์ง์ด lottoService ๋ฅผ ํ†ตํ•˜๋ฉด์„œ ๊ฒฐ๊ตญ ์ด ํด๋ž˜์Šค๋Š” ์ ์  ๋น„๋Œ€ํ•ด์งˆํ…๋ฐ์š” ์ข‹์€ ๊ฐœ์„  ๋ฐฉ๋ฒ•์ด ์—†์„๊นŒ์š”~?
@@ -0,0 +1,48 @@ +import java.util.Arrays; + +public enum Rank { + FIRST(6, 2000000000), + SECOND(5, 30000000), + THIRD(5, 1500000), + FOURTH(4, 50000), + FIFTH(3, 5000), + MISS(0, 0); + + private int countOfMatch; + private Money winningMoney; + + Rank(int countOfMatch, int winningMoney) { +...
Java
์ค‘๊ด„ํ˜ธ๊ฐ€ ๋น ์กŒ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,21 @@ +public class RankResult { + private Rank rank; + private int countOfRank; + + RankResult(Rank rank) { + this.rank = rank; + this.countOfRank = 0; + } + + public Rank getRank() { + return rank; + } + + public int getCountOfRank() { + return countOfRank; ...
Java
๋ฐ์ดํ„ฐ๋“ค์„ ํด๋ž˜์Šค๋กœ ๋ฌถ๋Š” ๊ฒƒ์ด ๊ฐ์ฒด์ง€ํ–ฅ์€ ์•„๋‹™๋‹ˆ๋‹ค~ RankResult ๋„ ๊ฒฐ๊ตญ ๋ฐ์ดํ„ฐ์™€ get ๋งŒ ๊ฐ€์ง€๊ณ  ์žˆ๊ณ , ์œ ์˜๋ฏธํ•œ ํ–‰์œ„๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค ใ… ใ…  ๋ถˆํ•„์š”ํ•œ ๊ฐ์ฒด๊ฐ€ ์•„๋‹Œ์ง€, ์œ ์˜๋ฏธํ•œ ํ–‰์œ„๋ฅผ ๊ฐ€์ง„ ๊ฐ์ฒด๋กœ ๋งŒ๋“ค๋ ค๋ฉด ์–ด๋–ค ํ–‰์œ„๋ฅผ ๋ถ€์—ฌํ•ด์•ผํ•˜๋Š”์ง€ ๊ณ ๋ฏผํ•ด๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”~
@@ -0,0 +1,50 @@ +import java.util.List; + +public class LottoSeller { + private LottoPurchaseService lottoPurchaseService; + private Money change; + + public LottoSeller() { + change = Money.ZERO; + lottoPurchaseService = new LottoPurchaseService(); + } + + public LottoTicket sellTicketTo(...
Java
Service ๋ผ๋Š” ๋„ค์ด๋ฐ์„ ์“ฐ์‹œ๋Š”๊ฑธ๋กœ ๋ด์„œ ์›น ์ชฝ ์ž๋ฃŒ๋ฅผ ๋ณด์‹  ๊ฒƒ ๊ฐ™์€๋ฐ, controller, service, repository ์ด๋Ÿฐ layered architecture ๋Š” ์ง€๊ธˆ ์ €ํฌ๊ฐ€ ํ•˜๊ณ  ์žˆ๋Š” ๊ฐ์ฒด์ง€ํ–ฅ๊ณผ ๊ฑฐ๋ฆฌ๊ฐ€ ์ข€ ์žˆ์Šต๋‹ˆ๋‹ค ~ service ๋ผ๋Š” ๋„ค์ด๋ฐ์„ ์‚ฌ์šฉํ•˜๊ธฐ๋ณด๋‹ค๋Š” ์ข€ ๋” ๊ตฌ์ฒด์ ์ด๊ณ  ๋ˆ„๊ตฌ๋‚˜ ๊ธ€ ์ฝ๋“ฏ์ด ๋ณผ ์ˆ˜ ์žˆ๋Š” ๋„ค์ด๋ฐ์„ ํ•˜์‹œ๋ฉด ํ•ด๋‹น ๊ฐ์ฒด์— ๋ถ€์—ฌํ•˜๋Š” ์ฑ…์ž„๊ณผ ํ–‰์œ„๋“ค๋„ ๋‹ฌ๋ผ์ง€๊ฒŒ ๋ฉ๋‹ˆ๋‹ค ~ ๋„ค์ด๋ฐ์€ ๋‹จ์ˆœํžˆ ์‹œ๊ฐ์ ์ธ ํšจ๊ณผ ๊ทธ ์ด์ƒ์˜ ๊ฐ€์น˜๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,50 @@ +import java.util.List; + +public class LottoSeller { + private LottoPurchaseService lottoPurchaseService; + private Money change; + + public LottoSeller() { + change = Money.ZERO; + lottoPurchaseService = new LottoPurchaseService(); + } + + public LottoTicket sellTicketTo(...
Java
์  ํ•˜๋‚˜ ์ฐ์„ ๋•Œ๋Š” ์ค„๋ฐ”๊ฟˆ์„ ์•ˆํ•˜์‹œ๋Š”๊ฒŒ ์ผ๋ฐ˜์ ์ž…๋‹ˆ๋‹ค. ๋ฉ”์†Œ๋“œ ํŒŒ๋ผ๋ฏธํ„ฐ๋„ 3๊ฐœ ์ด์ƒ๋ถ€ํ„ฐ ์—”ํ„ฐ๋ฅผ ์น˜์‹œ๋Š”๊ฒŒ ์–ด๋–จ๊นŒ์š”?
@@ -0,0 +1,42 @@ +import java.util.List; + +public class LottoService { + LottoUser lottoUser; + LottoSeller lottoSeller; + LottoTicket purchasedLottoTicket = null; + WinningLotto winningLotto = null; + PurchaseResultView purchaseResultView = null; + WinningResultView winningResultView = null; + + ...
Java
set์„ ์‚ฌ์šฉํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฐ์ฒด์ง€ํ–ฅ ์ƒํ™œ์ฒด์กฐ ๊ทœ์น™์„ ์ ์šฉํ•ด๋ณด์‹œ๋ฉด ์ฝ”๋“œ์˜ ์„ค๊ณ„๊ฐ€ ๋‹ฌ๋ผ์งˆ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,43 @@ +import java.util.ArrayList; +import java.util.List; + +public class LottoTicket { + private Money ticketPrice; + private Lottos autoLottos; + private Lottos manualLottos; + + public LottoTicket(Money ticketPrice, Lottos autoLottos, Lottos manualLottos) { + this.ticketPrice = ticketP...
Java
์—ฌ๊ธฐ๋„ ํ–‰์œ„๊ฐ€ ์—†๊ณ  ๋ฐ์ดํ„ฐ + getter ๋ฟ์ด๋„ค์š”. ๊ทธ๋Ÿฐ๋ฐ ์ด๋ ‡๊ฒŒ ํด๋ž˜์Šค๋ฅผ ๋‚˜๋ˆ ๋ณด๋ ค๊ณ  ์ตœ๋Œ€ํ•œ ์‹œ๋„ํ•˜์‹  ์  ๐Ÿ‘
@@ -0,0 +1,35 @@ +import java.util.List; + +public class LottoUser { + private Money investMoney; + private int countOfManualLotto; + private List<List<LottoNo>> numbersOfManualLottos; + + private LottoTicket lottoTicket; + + public LottoUser(Money investMoney, int countOfManualLotto, List<List<LottoNo>>...
Java
์—ฌ๊ธฐ๋„ setter getter ๋ฟ ์ด๋„ค์š” ใ… 
@@ -0,0 +1,65 @@ +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public final class LottoPurchaseService { + public final static Money LOTTO_PRICE = Money.valueOf(1000); + + public static Money validatePurchase(Money inputMoney, int countOfManualLotto) throws OutOfConditionE...
Java
๋ฐ์ดํ„ฐ์™€ ํ”„๋กœ์„ธ์Šค๊ฐ€ ๋”ฐ๋กœ ์žˆ๋Š” ๊ฒƒ == ์ ˆ์ฐจ์ง€ํ–ฅ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ํ˜„ ์ƒํ™ฉ : ๋ฐ์ดํ„ฐ = LottoSeller, Ticket, User ๋“ฑ (๋ฐ์ดํ„ฐ + getter) ํ”„๋กœ์„ธ์Šค = Service (๋ฐ์ดํ„ฐ get ํ•ด์„œ ๋กœ์ง ์ฒ˜๋ฆฌ) ๋‹ต : MVC์™€ layered architecture๋ฅผ ์žŠ๊ณ  view ์™€ ๋น„์ฆˆ๋‹ˆ์Šค ๋กœ์ง์„ ๋ถ„๋ฆฌํ•˜๋Š” ๊ฒƒ๋งŒ ๊ธฐ์–ตํ•˜๊ณ  ์งœ๋ณด๊ธฐ
@@ -0,0 +1,65 @@ +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Scanner; +import java.util.stream.Collectors; + +public final class InputView { + + public static Money scanMoney(Scanner scanner) { + System.out.println("\n๊ตฌ์ž…๊ธˆ์•ก์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”."); + + return Mon...
Java
view ์—์„œ๋Š” ๋ฐ์ดํ„ฐ๋ฅผ scan ํ•ด์˜ค๋Š” ์ฑ…์ž„๋งŒ ์žˆ์Šต๋‹ˆ๋‹ค. ์ง€๊ธˆ์€ ๋ณ€ํ™˜ ๋กœ์ง๊นŒ์ง€ ์—ฌ๊ธฐ์„œ ์ฒ˜๋ฆฌํ•˜๊ณ  ์žˆ๋„ค์š”~!
@@ -0,0 +1,29 @@ +public final class PurchaseResultView { + public void notifyIfChangeLeft(LottoSeller seller) { + if (!seller.getChange().equals(Money.ZERO)) { + System.out.println("์ž”๋ˆ " + seller.getChange() + "์›์ด ๋‚จ์•˜์Šต๋‹ˆ๋‹ค."); + System.out.println(); + } + } + + public void pr...
Java
finall class ๋กœ ํ•˜์‹  ์ด์œ ๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค~
@@ -1,23 +1,20 @@ <template> - <button - @click=" - () => { - if (!props.disabled) props.onClick(); - } - " - :class="getNextButtonStyle()" - > - <slot></slot> + <button @click="handleNextButtonClick" :class="getNextButtonStyle()"> + <slot /> </button> </template> <script setu...
Unknown
๋‹จ์ˆœ ๊ถ๊ธˆ์ฆ์œผ๋กœ ์งˆ๋ฌธ๋“œ๋ฆฝ๋‹ˆ๋‹ค. undefined๋ฅผ ํƒ€์ž…์œผ๋กœ ์ง€์ •ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”? NextButton.vue์˜ ๋ถ€๋ชจ ์ปดํฌ๋„ŒํŠธ์—์„œ isPrimary ๊ฐ’์„ ๋ถ€์—ฌํ•˜์ง€ ์•Š์„ ๋•Œ๊ฐ€ ์žˆ์–ด undefined๋ฅผ ํฌํ•จํ•œ ๊ฒƒ์œผ๋กœ ๋ณด์ด๋Š”๋ฐ, ์ด ๊ฒฝ์šฐ๋Š” ? ๋งŒ์œผ๋กœ๋„ ์ถฉ๋ถ„ํžˆ ํ‘œํ˜„์ด ๋œ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ํŠนํžˆ boolean์ด๊ธฐ๋•Œ๋ฌธ์— undefined์ผ ๋•Œ falsyํ•˜๊ฒŒ ์ธ์‹์ด ๋  ๊ฒƒ ๊ฐ™์€๋ฐ ์ถ”๊ฐ€ํ•˜์‹  ์ด์œ ๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค~
@@ -3,8 +3,8 @@ <p class="text-medium font-semi_bold">{{ title }}</p> <div class="flex gap-x-3"> <button - v-for="size in sizes" - :key="size.id" + v-for="(size, index) in sizes" + :key="getButtonKey(size, index)" class="flex flex-col items-center justify-between ga...
Unknown
storeToRefs ๋ฅผ ์‚ฌ์šฉํ•ด์„œ ๋ฐ˜์‘์„ฑ์„ ์‚ด๋ฆฌ์…จ๋„ค์š” ๐Ÿ‘
@@ -3,16 +3,12 @@ <section class="mx-auto flex h-full flex-col items-center justify-between bg-gray_00-light text-gray_05-light dark:bg-gray_00-dark dark:text-gray_05-dark sm:w-screen md:w-96" > - <ProgressNavBar prevPage="/size" pageName="ingredient" /> - <div v-if="isLoading">๋กœ๋”ฉ์ค‘์ž…๋‹ˆ๋‹ค.</div> ...
Unknown
์„œ๋ฒ„ ์ƒํƒœ๊ด€๋ฆฌ์™€ ํด๋ผ์ด์–ธํŠธ ์ƒํƒœ๊ด€๋ฆฌ๋ฅผ ๋ถ„๋ฆฌํ•˜์—ฌ ๊ด€๋ฆฌํ•˜์…จ๊ตฐ์š” ๐Ÿ‘
@@ -1,23 +1,20 @@ <template> - <button - @click=" - () => { - if (!props.disabled) props.onClick(); - } - " - :class="getNextButtonStyle()" - > - <slot></slot> + <button @click="handleNextButtonClick" :class="getNextButtonStyle()"> + <slot /> </button> </template> <script setu...
Unknown
์‚ฌ์‹ค ์ €๋„ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์•˜๋‹ค๊ฐ€, ์ข€๋” ๊ฐ€์‹œ์ ์œผ๋กœ ํ‘œํ˜„ํ•˜๋ ค๊ณ  ์ž‘์„ฑ์„ ํ–ˆ์–ด์š”! ์Œ, ๋ฉ”์ด๋ธŒ๋‹˜ ๋ง์”€๋“ฃ๊ณ  ๋‹ค์‹œ ์ƒ๊ฐํ•ด๋ณด๋‹ˆ ๊ฐ€์‹œ์„ฑ๋งŒ์œผ๋กœ ์ถ”๊ฐ€ํ•˜๋Š” ๊ฑด ์ข€ ์˜๋ฏธ๊ฐ€ ์—†๋Š” ๊ฒƒ ๊ฐ™๊ธดํ•˜๋„ค์š”!!
@@ -3,20 +3,18 @@ class="text-gray_05-light dark:text-gray_05-dark w-6 h-6" @click="goBack" > - <slot></slot> + <slot /> </button> </template> <script setup lang="ts"> -import { useRouter } from 'vue-router'; +import { pushPage } from '@router/route.helper'; const props = defineProps<{ p...
Unknown
ํ™”์‚ดํ‘œ ํ•จ์ˆ˜๋กœ ํ•ด์ฃผ์„ธ์š”~
@@ -0,0 +1,91 @@ +package christmas.Controller; + +import christmas.Domain.EventBenefitSettler; +import christmas.Domain.EventPlanner; +import christmas.Event.EventBadge; +import christmas.View.InputView; +import christmas.View.OutputView; +import java.util.Map; + +public class EventController { + public EventPlanne...
Java
```suggestion public void takeVisitDate() { try { String visitDate = InputView.readVisitDate(); eventBenefitSettler = new EventBenefitSettler(visitDate); } catch (IllegalArgumentException e) { OutputView.printException(e); takeVisitDate(); ...
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
์ •๊ทœํ‘œํ˜„์‹์„ ์ •๋ง ์ž˜ ํ™œ์šฉํ•˜์‹œ๋Š”๊ตฐ์š”!๐Ÿ‘๐Ÿ‘ ๊ทธ๋Ÿฐ๋ฐ `(?:,|$)` ๋Š” ์–ด๋–ค ์—ญํ• ์„ ํ•˜๋Š”์ง€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
`isDrinkMenu` ๋Š” `MenuBoard` ์—๊ฒŒ ๋„˜๊ฒจ์ฃผ๋ฉด ์–ด๋–จ๊นŒ์š”?? ์Œ๋ฃŒ๋ฅผ ํ™•์ธํ•˜๋Š” ์ฑ…์ž„์€ `MenuBoard` ๊ฐ€ ๊ฐ€์ง€๊ณ  ์žˆ๋Š”๊ฒŒ ๋” ์–ด์šธ๋ฆด ๊ฒƒ ๊ฐ™์•„์š”! ๐Ÿ˜
@@ -0,0 +1,92 @@ +package christmas.Util; + +import static christmas.Event.EventOption.EVENT_END_DATE; +import static christmas.Event.EventOption.EVENT_START_DATE; +import static christmas.Event.EventOption.MAX_ORDER_QUANTITY; +import static christmas.Message.OutputMessage.NOT_A_VALID_DATE; + +import christmas.Domain.M...
Java
ํ•ด๋‹น ์ •๊ทœํ‘œํ˜„์‹์ด ๋ฐ˜๋ณต๋˜๋Š” ๊ฒƒ ๊ฐ™์•„์š”! ๊ทธ๋ ‡๋‹ค๋ฉด Pattern ๊ฐ์ฒด๋ฅผ ์บ์‹ฑํ•ด์ฃผ๋ฉด ์–ด๋–จ๊นŒ์š”?? ๋””์Šค์ฝ”๋“œ ํ•จ๊ป˜ ๋‚˜๋ˆ„๊ธฐ์— ํ˜„์ง€๋‹˜์ด[ ๊ณต์œ ํ•˜์‹  ๊ธ€](https://velog.io/@dlguswl936/%EA%B3%B5%EB%B6%80%ED%95%9C-%EA%B2%83-String.matches%EB%8A%94-%EC%99%9C-%EC%84%B1%EB%8A%A5%EC%97%90-%EC%95%88-%EC%A2%8B%EC%9D%84%EA%B9%8C#%EA%B2%B0%EB%A1%A0-pattern-%EA%B0%9D%EC%B2%B4%EB%A5%BC-%EC%BA%90%EC%8B%B1...
@@ -0,0 +1,30 @@ +package christmas.Util; + +public class CommaFormatter { + public static String formatWithComma(int number) { + String numberStr = Integer.toString(number); + int length = numberStr.length(); + + if (length <= 3) { + return numberStr; + } + String resul...
Java
์ฝค๋งˆ๋ฅผ ์œ„ํ•ด ์ „์šฉ ๊ฐ์ฒด๋ฅผ ๋งŒ๋“ค์–ด์ฃผ์…จ๊ตฐ์š”! ์ง์ ‘ ๋งŒ๋“ค์–ด์ฃผ๋Š” ๊ฒƒ๋„ ์ข‹๋„ค์š”! ๊ทธ๋Ÿฐ๋ฐ ๋ˆ ๋‹จ์œ„๋ฅผ ์œ„ํ•œ ์ฝค๋งˆ๋ฅผ ๋„ฃ์–ด์ฃผ๋Š” ๊ธฐ๋Šฅ์„ ์ž๋ฐ”์—์„œ ์ œ๊ณตํ•˜๊ณ  ์žˆ๋‹ต๋‹ˆ๋‹ค! ใ…Žใ…Ž DecimalFormat ์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณด์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”! ์ œ๊ฐ€ [์ฐธ๊ณ ํ–ˆ๋˜ ๊ธ€](https://jamesdreaming.tistory.com/203)์„ ๊ณต์œ ํ•ฉ๋‹ˆ๋‹ค!
@@ -0,0 +1,67 @@ +package christmas.Domain; + +import christmas.Util.OrderMenuValidator; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class EventPlanner { + private final List<Menu> o...
Java
```suggestion public Map<String, Integer> calculateCategoryCount() { Map<String, Integer> categoryCount = new HashMap<>(); int count = 0; for (Menu menu : orderMenu) { String menuCategory = menu.getMenuCategory(); categoryCount.put(menuCategory, categoryCount.ge...
@@ -0,0 +1,102 @@ +package christmas.Domain; + +import christmas.Event.EventBenefit; +import christmas.Event.EventOption; +import christmas.Event.SpecialDiscountDay; +import christmas.Util.OrderMenuValidator; +import java.time.DayOfWeek; +import java.time.LocalDate; +import java.util.HashMap; +import java.util.Map; + +...
Java
`LocalDate` ๋ฅผ ํ™œ์šฉํ•˜๋ฉด ์š”์ผ์„ ํŒŒ์•…ํ•  ์ˆ˜ ์žˆ๊ตฐ์š”! ๋ฐฐ์›Œ๊ฐ‘๋‹ˆ๋‹ค! ๐Ÿ˜
@@ -47,4 +47,13 @@ final class SettingViewModel { seconds: 0, identifier: "SelectedTimeNotification") } + + // URL ์—ด๊ธฐ ๋ฉ”์„œ๋“œ + func openURL(_ urlString: String) { + guard let url = URL(string: urlString), UIApplication.shared.canOpenURL(url) else { + print("์œ ํšจํ•˜์ง€ ์•Š...
Swift
url ์ด๋™์ด ์ด๋ ‡๊ฒŒ ๊ตฌํ˜„ํ•˜๋Š” ๊ฑฐ๊ตฐ์š”
@@ -0,0 +1,209 @@ +import styled from '@emotion/styled'; +import { colors } from '@sopt-makers/colors'; +import { fonts } from '@sopt-makers/fonts'; +import { IconCheck, IconChevronDown } from '@sopt-makers/icons'; +import { Button } from '@sopt-makers/ui'; +import { ReactNode, useEffect, useState } from 'react'; + +im...
Unknown
๊ทธ `BottomSheetSelect`์ปดํฌ๋„ŒํŠธ๋ฅผ ์ด์ „์— ๋„์˜์ด๊ฐ€ ๊ตฌํ˜„ํ•ด์คฌ์—ˆ๋Š”๋ฐ ์š”๊ฒŒ ๋™์ผํ•œ ๋ชฉ์ ์„ ๊ฐ€์ง„ ์ปดํฌ๋„ŒํŠธ์ธ๊ฑธ๋กœ ๋ณด์—ฌ์„œ์š”..!!! ํ˜น์‹œ ๋”ฐ๋กœ ๊ตฌํ˜„ํ•˜์‹  ์ด์œ ๊ฐ€ ์žˆ์„๊นŒ์š”?? ํ˜น์‹œ ์กด์žฌํ•˜๋Š”์ง€ ๋ชฐ๋ž๋˜๊ฑธ๊นŒ ์ฃผ๋ฅต.. ๋งŒ์•ฝ์— ๊ทธ๋Ÿฐ๊ฒƒ์ด๋ผ๋ฉด ์–ด์ฐจํ”ผ mds๋กœ ๋Œ€์ฒด๋˜์–ด์•ผํ•  ๋ถ€๋ถ„์ด๋‹ˆ, ์ž˜ ์ž‘๋™ํ•œ๋‹ค๋ฉด ์ˆ˜์ •ํ•  ํ•„์š”๋Š” ์—†์„๊ฑฐ๊ฐ™์Šต๋‹ˆ๋‹ค!!!!
@@ -0,0 +1,328 @@ +import styled from '@emotion/styled'; +import { colors } from '@sopt-makers/colors'; +import { fonts } from '@sopt-makers/fonts'; +import { Button, Callout, SelectV2, Tag, TextArea, useDialog, useToast } from '@sopt-makers/ui'; +import { useMutation } from '@tanstack/react-query'; +import { useRouter...
Unknown
mutation ์‹คํŒจ์‹œ ์—๋Ÿฌ์ฒ˜๋ฆฌ๋„ ๋„ฃ์–ด์ฃผ๋ฉด ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!! onError ์˜ต์…˜์„ ์ถ”๊ฐ€ํ•ด์„œ '๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์–ด์š”.' ์™€ ๊ฐ™์€ toast๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์–ด๋„ ์ข‹์„๊ฑฐ๊ฐ™์•„์š”!
@@ -0,0 +1,209 @@ +import styled from '@emotion/styled'; +import { colors } from '@sopt-makers/colors'; +import { fonts } from '@sopt-makers/fonts'; +import { IconCheck, IconChevronDown } from '@sopt-makers/icons'; +import { Button } from '@sopt-makers/ui'; +import { ReactNode, useEffect, useState } from 'react'; + +im...
Unknown
์•— ์ด๊ฑฐ ์ฝ”๋“œ ์ž์ฒด๊ฐ€ ๋„์˜์ด๊ฐ€ ๋งŒ๋“ ๊ฑฐ ๊ธฐ๋ฐ˜์ด ๋งž์Šต๋‹ˆ๋‹ค ใ…Žใ…Ž! ๋‹จ, ์ด๋ฒˆ์— mds ๋””์ž์ธ์ด ์—…๋ฐ์ดํŠธ ๋˜๋ฉด์„œ ๊ธฐ์กด ๋ฐ”ํ…€์‹œํŠธ ๋””์ž์ธ์ด ์•„๋‹ˆ๋ผ.. description ๋ถ€๋ถ„์ด ์ถ”๊ฐ€๋˜์–ด๊ฐ€์ง€๊ณ , ๋„์˜์ด๊ฐ€ ๋งŒ๋“ค์–ด์ค€ ์นœ๊ตฌ๋ž‘ ์กฐ๊ธˆ ๋‹ค๋ฅด๊ฒŒ ์ž‘๋™ํ•ด์•ผ ํ–ˆ์Šต๋‹ˆ๋‹ค..! ๊ธฐ์กด์— ์“ฐ์ด๋˜ ๋ฐ”ํ…€์‹œํŠธ๋ฅผ ์ˆ˜์ •ํ•˜๋ฉด ์‚ฌ์ด๋“œ์ดํŽ™ํŠธ๊ฐ€ ์ข€ ๋งŽ์ด ์ƒ๊ธธ ๊ฒƒ ๊ฐ™์•„์„œ ์ผ๋‹จ์€ ํ˜„์žฌ ์ปค์Šคํ…€์œผ๋กœ ๊ตฌํ˜„ํ•ด๋‘”๊ฑฐ๋ผ, Mds๋กœ ๋Œ€์ฒดํ•˜๋ฉด ๋  ๊ฒƒ๊ฐ™์•„์š”!
@@ -0,0 +1,328 @@ +import styled from '@emotion/styled'; +import { colors } from '@sopt-makers/colors'; +import { fonts } from '@sopt-makers/fonts'; +import { Button, Callout, SelectV2, Tag, TextArea, useDialog, useToast } from '@sopt-makers/ui'; +import { useMutation } from '@tanstack/react-query'; +import { useRouter...
Unknown
์•„์•„ ๋„ˆ๋ฌด ์ข‹์Šต๋‹ˆ๋‹ค!
@@ -0,0 +1,209 @@ +import styled from '@emotion/styled'; +import { colors } from '@sopt-makers/colors'; +import { fonts } from '@sopt-makers/fonts'; +import { IconCheck, IconChevronDown } from '@sopt-makers/icons'; +import { Button } from '@sopt-makers/ui'; +import { ReactNode, useEffect, useState } from 'react'; + +im...
Unknown
์•„ UI๊ฐ€ ์ข€ ๋‹ฌ๋ž๊ตฐ์š”~!!! ํ™•์ธํ–ˆ์Šต๋‹ˆ๋‹ค ใ…Žใ…Žใ…Ž
@@ -0,0 +1,31 @@ +package com.spoteditor.backend.domain.user.controller; + +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.domain.user.service.UserTokenService; +import jakarta.servlet.http.HttpServl...
Java
BaseException์ด RuntimeException์„ ์ƒ์†๋ฐ›๋Š” ์ €ํฌ ํ”„๋กœ์ ํŠธ์˜ ์ตœ์ƒ์œ„ ์˜ˆ์™ธ๊ฐ€ ๋งž๋‹ค๋ฉด ์ง์ ‘ ๋…ธ์ถœ์„ ํ•  ํ•„์š”๊ฐ€ ์—†์–ด๋ณด์ž…๋‹ˆ๋‹ค. ์ตœ์ƒ์œ„ ์–ธ์ฒดํฌ ์˜ˆ์™ธ๋ฅผ ๊ฐœ๋ฐœ ํ›„ ๊ทธ ์–ธ์ฒดํฌ ์˜ˆ์™ธ๋ฅผ ์ƒ์†๋ฐ›๊ณ  ๊ฐ๊ฐ์˜ ์ปค์Šคํ…€ ์˜ค๋ฅ˜ ์ฝ”๋“œ๋ฅผ ๋“ฑ๋กํ•œ๋‹ค๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ์˜ˆ์™ธ ์ฒ˜๋ฆฌ๋Š” ์„ธ๋ฐ€ํ•˜๊ฒŒ ํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,41 @@ +package com.spoteditor.backend.domain.user.service; + +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.util.CookieUtils; +import com.spoteditor.backend.domain.user.common.dto....
Java
์ด ๋ถ€๋ถ„๋„ ๋™์ผํ•œ ๋งฅ๋ฝ์ž…๋‹ˆ๋‹ค.
@@ -0,0 +1,43 @@ +package com.spoteditor.backend.security.oauth.handler; + +import com.spoteditor.backend.common.util.CookieUtils; +import com.spoteditor.backend.security.jwt.JwtConstants; +import com.spoteditor.backend.security.jwt.JwtUtils; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpSe...
Java
`/success` ๊ฒฝ๋กœ๊ฐ€ ์ฝœ๋ฐฑ ์ฒ˜๋ฆฌ์ธ๊ฐ€์š”?
@@ -0,0 +1,43 @@ +package com.spoteditor.backend.security.oauth.handler; + +import com.spoteditor.backend.common.util.CookieUtils; +import com.spoteditor.backend.security.jwt.JwtConstants; +import com.spoteditor.backend.security.jwt.JwtUtils; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpSe...
Java
๋„ค ๋งž์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,31 @@ +package com.spoteditor.backend.domain.user.controller; + +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.domain.user.service.UserTokenService; +import jakarta.servlet.http.HttpServl...
Java
๋‹ต๋ณ€์ฃผ์‹  ๋‚ด์šฉ์ด BaseException์„ ์ƒ์†๋ฐ›๋Š” ๊ฐ๊ฐ์˜ ์ปค์Šคํ…€ ์˜ค๋ฅ˜ ํด๋ž˜์Šค๋ฅผ ์ƒ์„ฑํ•ด์„œ ๋” ์˜๋ฏธ๋ฅผ ๋ช…ํ™•ํ•˜๊ฒŒ ํ•˜๋ผ๋Š” ๋ง์”€์ด์‹ ๊ฐ€์š”?
@@ -0,0 +1,31 @@ +package com.spoteditor.backend.domain.user.controller; + +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.domain.user.service.UserTokenService; +import jakarta.servlet.http.HttpServl...
Java
๋„ค, ์ง€๊ธˆ ์ฝ”๋“œ๋ฅผ ๋ณด์‹œ๋ฉด BaseException์„ ๊ทธ๋Œ€๋กœ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๋˜์–ด ์žˆ๋Š”๋ฐ ์ถ”๊ฐ€ ์š”๊ตฌ์‚ฌํ•ญ ์ ‘์ˆ˜์‹œ ์œ ์ง€๋ณด์ˆ˜๊ฐ€ ์–ด๋ ค์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
@@ -0,0 +1,31 @@ +package com.spoteditor.backend.domain.user.controller; + +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.domain.user.service.UserTokenService; +import jakarta.servlet.http.HttpServl...
Java
๊ทธ๋ฆฌ๊ณ  ์ถ”๊ฐ€์ ์œผ๋กœ ๋ง์”€์„ ๋“œ๋ฆฌ๋Š”๊ฑด ์ €ํฌ ๊ฐ„ํŠธ ์ฐจํŠธ์— ์žˆ๋Š” ๊ทœ์•ฝ์„ ๋‹ค์‹œ ํ•œ ๋ฒˆ ์ดํ•ด๋ฅผ ํ•˜์…”์•ผ ํ•  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค POST ์š”์ฒญ์ธ ๊ฒฝ์šฐ์—๋Š” ๋ถ„๋ช… ๋ฐ”๋””๊ฐ€ ์—†์ด HTTP Status Code๋ฅผ ๋ช…ํ™•ํ•˜๊ฒŒ ๋ณด๋‚ด์ค˜์•ผํ•˜๋Š”๋ฐ ์˜คํžˆ๋ ค List ์ปฌ๋ ‰์…˜์„ ๋ฐ˜ํ™˜ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค
@@ -0,0 +1,41 @@ +package com.spoteditor.backend.domain.user.service; + +import com.spoteditor.backend.common.exceptions.user.UserErrorCode; +import com.spoteditor.backend.common.exceptions.user.UserException; +import com.spoteditor.backend.common.util.CookieUtils; +import com.spoteditor.backend.domain.user.common.dto....
Java
์ด UserIdDto๋ฅผ ์ปจํŠธ๋กค๋Ÿฌ์—์„œ ์–ด๋–ป๊ฒŒ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๋Š”์ง€๋ฅผ ๋ฌธ์„œํ™”ํ•ด์ฃผ์‹œ๋ฉด ์ฝ์–ด๋ณด๊ณ  ๊ณต๊ฐ„ ์ธก์— ์ ์šฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
์˜ค ๊ตฌ์กฐ๋ถ„ํ•ด ํ• ๋‹น~
@@ -1,8 +1,79 @@ import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import './Login.scss'; class Login extends Component { + constructor() { + super(); + this.state = { + id: '', + pw: '', + }; + } + + handleInput = event => { + const { name, value } = ev...
JavaScript
this.state.id.includes('@') && this.state.id.length >= 5 && this.state.pw.length >= 8 ์ด๊ฑธ true/false Boolean?? ์ด๊ฐ’์„ ์‚ฌ์šฉํ•ด์„œ ์‚ผํ•ญ์—ฐ์‚ฐ์ž๋กœ ํ•ด๋„ ๋˜์ง€ ์•Š์„๊นŒ์š” ์ˆ˜์ •๋‹˜์€ ์ž˜ํ•˜์‹œ๋‹ˆ ์•„๋งˆ๊ฐ€๋Šฅํ•˜์‹ค๋“ฏ!
@@ -0,0 +1,61 @@ +.Login { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + + main { + display: flex; + flex-direction: column; + justify-content: space-around; + width: 350px; + height: 380px; + padding: 40px; + border: 1px solid #ccc; + + header { + ...
Unknown
์ด๊ฑด ์™œ ์ฃผ์„์œผ๋กœ ๋˜์žˆ๋‚˜์š”???
@@ -0,0 +1,134 @@ +[ + { + "id": 1, + "userName": "eessoo__", + "src": "../images/soojeongLee/user2.jpg", + "feedText": "๐Ÿ’Ÿ", + "commentData": [ + { + "id": 1, + "userName": "wecode", + "content": "Welcome to world best coding bootcamp!", + "commnetLike": false + },...
Unknown
์ œ์ด์Šจ ํŒŒ์ผ๋„ ์žˆ์—ˆ๊ตฐ์š”!
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
์˜ค ์ด๋ ‡๊ฒŒ ๋‹ค์‹œ ๋ณผ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•๋„ ๋‚˜์˜์ง€ ์•Š์€ ๋“ฏ ? ๋‚˜์ค‘์— ๊ฐ€์„œ๋Š” ์ง€์›Œ์•ผ ๋  ์ˆ˜๋„ ์žˆ์ง€๋งŒ...?
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
๋ฒ„ํŠผ์œผ๋กœ ํ•œ ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”? ๊ถ๊ธˆ
@@ -0,0 +1,175 @@ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +import Comment from './Comment/Comment'; + +import '../Feed/Feed.scss'; + +export class Feed extends Component { + constructor() { + super(); + this.state = { + comment: '', + // commentList: [], +...
JavaScript
autoComplete ์ด๊ฑฐ๋Š” ๋ญ”๊ฐ€์š”? ๊ถ๊ธˆ~
@@ -0,0 +1,128 @@ +@import '../../../../styles/variables.scss'; + +article { + margin-bottom: 20px; + background-color: #fff; + border-radius: 3px; + border: 1px solid $border-color; + + header { + @include flex-center; + justify-content: space-between; + align-content: center; + padding: 10px; + + ...
Unknown
์ด๋Ÿฐ scss ๊ธฐ๋Šฅ ์ €๋Š” ํ—ท๊ฐˆ๋ ค์„œ ์ž˜ ๋ชปํ•˜๊ฒ ๋˜๋ฐ ์ž˜ํ•˜์‹œ๋„ค์š”..
@@ -0,0 +1,23 @@ +//๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ +import React, { Component } from 'react'; +import { Link } from 'react-router-dom'; + +//์ปดํฌ๋„ŒํŠธ +import { FOOTLIST } from '../FootLists/footData'; + +// css +import './FootLists.scss'; + +export class FootLists extends Component { + render() { + return FOOTLIST.map(footlists => { + ret...
JavaScript
๋Œ“๊ธ€ ํ”„๋ž์Šค!
@@ -0,0 +1,46 @@ +export const FOOTLIST = [ + { + id: 1, + footlist: '์†Œ๊ฐœ', + }, + { + id: 2, + footlist: '๋„์›€๋ง', + }, + { + id: 3, + footlist: 'ํ™๋ณด ์„ผํ„ฐ', + }, + { + id: 4, + footlist: 'API', + }, + { + id: 5, + footlist: '์ฑ„์šฉ ์ •๋ณด', + }, + { + id: 6, + footlist: '๊ฐœ์ธ์ •๋ณด์ฒ˜๋ฆฌ๋ฐฉ์นจ', + }...
JavaScript
ํ™”์ดํŒ… ํ‘ธํ„ฐ ๋งŒ๋“ค์–ด์„œ ๊ฐ•์˜ ๋ถ€ํƒ๋“œ๋ ค์š”