์ „์ฒด ๊ธ€ 202

45. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ

45. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ ์Šค์นด์šฐํŠธ ๋œ ์„ ์ˆ˜์˜ ๊ณ„์•ฝ, ๋ชฉ๋ก์—์„œ ์‚ญ์ œ๋ฅผ ์œ„ํ•ด ํ•ด๋‹น ํŽ˜์ด์ง€๋ฅผ ์ƒ์„ฑํ•œ๋‹ค. ๋ฐฑ์—”๋“œ ์Šค์นด์šฐํŠธ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ ์ถ”๊ฐ€ 23. ์Šค์นด์šฐํ„ฐ ๋ชฉ๋ก ์‚ญ์ œ ๋•Œ ์ƒ์„ฑํ•œ ์Šค์นด์šฐํŠธ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ ์‚ฌ์šฉ 1. ScoutService // ์Šค์นด์šฐํ„ฐ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ public Scout getScoutOne(Long no); 2. ScoutServiceImpl // ์Šค์นด์šฐํ„ฐ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ @Override public Scout getScoutOne(Long no) { Optional scout = sRepository.findById(no); return scout.orElse(null); } 3. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ(ScoutController) //์Šค์นด์šฐํ„ฐ ๋ชฉ๋ก 1๊ฐœ ์กฐํšŒ // 127...

44. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์กฐํšŒ

44. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์กฐํšŒ 22. member ๋ณ„ ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์กฐํšŒ ์—ฐ๋™ ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ํŽ˜์ด์ง€ ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€ 1. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ํŒŒ์ผ ์ƒ์„ฑ 2. ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€ 2-1. index.js import { createWebHistory, createRouter } from "vue-router"; import Home from '@/components/Home' import Join from '@/components/Join' import Login from '@/components/Login' import Logout from '@/components/Logout' import Registration from '@/components/Registration' import PlayerList from '@/co..

43. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์ถ”๊ฐ€

43. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์ถ”๊ฐ€ 21. ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์ถ”๊ฐ€ ์—ฐ๋™ ์Šค์นด์šฐํŠธ ๋ชฉ๋ก ์ถ”๊ฐ€ ๋ฒ„ํŠผ ์ƒ์„ฑ ์„ ์ˆ˜ ์ƒ์„ธ ํŽ˜์ด์ง€์— ์„ ์ˆ˜ ์ •๋ณด ํ•˜๋‹จ์— ๋ฒ„ํŠผ ์ƒ์„ฑ(Player_One.vue) ์Šค์นด์šฐํŠธ ์„ ์ˆ˜ ์ƒ์„ธ ํŽ˜์ด์ง€ {{no}} Aside Main {{player.playername}} {{player.playerage}} ์„ธ {{player.playerheight}} cm {{player.playerweight}} kg {{player.playerposition}} {{player.playercountry}} {{player.playerprice}} \ {{teamname}} {{agentname}} ์Šค์นด์šฐํŠธ ๋”๋ณด๊ธฐ ๋ฆฌ๋ทฐ ํ‰์  {{review.content}} {{review.rating}}/10 ๋‚ด์šฉ ํ‰์  1 2 3 4 5..

42. ์„ ์ˆ˜ ๋“ฑ๋ก

42. ์„ ์ˆ˜ ๋“ฑ๋ก 10. ์„ ์ˆ˜ ๋“ฑ๋ก ์—ฐ๋™ ์„ ์ˆ˜ ๋“ฑ๋ก ๊ตฌํ˜„(Registration.vue) ๋”๋ณด๊ธฐ ํŒ€ ๋“ฑ๋ก ํŒ€ ๋ช… ์—์ด์ „ํŠธ ๋“ฑ๋ก ์—์ด์ „ํŠธ ๋ช… ์„ ์ˆ˜ ๋“ฑ๋ก ์ด๋ฆ„ ๋‚˜์ด ์„ธ ์‹ ์žฅ cm ๋ชธ๋ฌด๊ฒŒ kg ํฌ์ง€์…˜ FWD MD DF ๋‚˜๋ผ ๋ชธ๊ฐ’ \ ์‚ฌ์ง„ ์†Œ์† ํŒ€ ์„ ํƒ์•ˆํ•จ {{team.teamname}} ์—์ด์ „ํŠธ ์„ ํƒ์•ˆํ•จ {{agent.agentname}} ์†Œ์† ํŒ€, ์—์ด์ „ํŠธ ๋ชฉ๋ก ๊ฐ€์ ธ์˜ค๊ธฐ ์†Œ์† ํŒ€๊ณผ ์—์ด์ „ํŠธ๋Š” ์„œ๋ฒ„์— ์ €์žฅ๋˜์–ด ์žˆ๋Š” ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์™€์„œ selectbox๋กœ ๋‚˜ํƒ€๋‚ธ๋‹ค. async created(){ //ํŒ€ ๋ชฉ๋ก ์กฐํšŒ const url = "/REST/teamall"; const headers = {"Content-Type":"application/json"} const response = await axios.get(..

41. ๋ฆฌ๋ทฐ ๋ชฉ๋ก

41. ๋ฆฌ๋ทฐ ๋ชฉ๋ก 37. ์„ ์ˆ˜ ๋ชฉ๋ก ํŽ˜์ด์ง€๋„ค์ด์…˜ ์ฐธ๊ณ  ๋ฐฑ์—”๋“œ ์„ ์ˆ˜ ๋ฒˆํ˜ธ ๋ณ„ ๋ฆฌ๋ทฐ ์ˆซ์ž ์กฐํšŒ ์ถ”๊ฐ€ 1. ๋ฆฌ๋ทฐ ์ €์žฅ์†Œ(ReviewRepository) //์„ ์ˆ˜ ๋ฒˆํ˜ธ ๋ณ„ ๋ฆฌ๋ทฐ ์ˆซ์ž ์กฐํšŒ Long countAllByPlayer_Playerno(Long playerno); 2-1. ๋ฆฌ๋ทฐ ์„œ๋น„์Šค(ReviewService) //์„ ์ˆ˜ ๋ฒˆํ˜ธ ๋ณ„ ๋ฆฌ๋ทฐ ์ˆซ์ž ์กฐํšŒ public Long getReviewByPlayernoCount(Long no); 2-2. ๋ฆฌ๋ทฐ ์„œ๋น„์Šค(ReviewServiceImpl) //์„ ์ˆ˜ ๋ฒˆํ˜ธ ๋ณ„ ๋ฆฌ๋ทฐ ์ˆซ์ž ์กฐํšŒ @Override public Long getReviewByPlayernoCount(Long no) { return rRepository.countAllByPlayer_Playerno(no);..

40. ๋ฆฌ๋ทฐ ๋“ฑ๋ก

40. ๋ฆฌ๋ทฐ ๋“ฑ๋ก 15. REVIEW ๋“ฑ๋ก ์—ฐ๋™ ์„ ์ˆ˜ ์ƒ์„ธ ํŽ˜์ด์ง€์—์„œ ์„ ์ˆ˜ ์ •๋ณด ํ•˜๋‹จ์— ํ•ด๋‹น ์„ ์ˆ˜์˜ ๋ฆฌ๋ทฐ๋ฅผ ๋“ฑ๋กํ•œ๋‹ค. ๋ฆฌ๋ทฐ ๋“ฑ๋ก ํ™”๋ฉด ๊ตฌํ˜„(Player_One.vue) ์„ ์ˆ˜ ์ƒ์„ธ ํŽ˜์ด์ง€ {{no}} ๋”๋ณด๊ธฐ {{player.playername}} {{player.playerage}} ์„ธ {{player.playerheight}} cm {{player.playerweight}} kg {{player.playerposition}} {{player.playercountry}} {{player.playerprice}} \ 1 2 3 4 5 6 7 8 9 10 ๋ฆฌ๋ทฐ ๋“ฑ๋ก ๋ฆฌ๋ทฐ ๋“ฑ๋ก ๋ฆฌ๋ทฐ ๋“ฑ๋ก์€ ๋กœ๊ทธ์ธ ๋œ ์ƒํƒœ์—์„œ๋งŒ ๊ฐ€๋Šฅํ•˜๋‹ค. ์œ ํšจ์„ฑ ๊ฒ€์‚ฌ๋ฅผ ์ด์šฉํ•ด ๋‚ด์šฉ ์ž…๋ ฅ ์—ฌ๋ถ€๋ฅผ ํ™•์ธํ•œ๋‹ค. import axios from 'axi..

39. ์ƒ์„ธ ํŽ˜์ด์ง€ ์ˆ˜์ •(element)

39. ์ƒ์„ธ ํŽ˜์ด์ง€ ์ˆ˜์ •(element) ํ˜„์žฌ ๋งŒ๋“ค์–ด์ง„ ์ƒ์„ธ ํŽ˜์ด์ง€๋ฅผ element๋ฅผ ์ด์šฉํ•˜์—ฌ ๋ณด๊ธฐ ์ข‹๊ฒŒ ์ˆ˜์ •ํ•œ๋‹ค. element from copy element ํ™ˆํŽ˜์ด์ง€์—์„œ ์ƒ์„ธ ํŽ˜์ด์ง€์— ์‚ฌ์šฉํ•  form์˜ code๋ฅผ copy ํ•œ๋‹ค. vue์— ์ ์šฉ {{player.playername}} {{player.playername}} {{player.playerheight}} {{player.playerweight}} {{player.playerposition}} {{player.playercountry}} {{player.playerprice}} ์ƒ์„ธ ํŽ˜์ด์ง€ ํ™•์ธ ๊ฐ„๊ฒฉ ์กฐ์ ˆ์ด ๋˜์–ด ์ด์ „๋ณด๋‹ค ๋ณด๊ธฐ ์ข‹๊ฒŒ ์ˆ˜์ •๋˜์—ˆ๋‹ค.

38. ์ƒ์„ธ ํŽ˜์ด์ง€

38. ์ƒ์„ธ ํŽ˜์ด์ง€ ์ƒ์„ธ ํŽ˜์ด์ง€ ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€ 1. ์ƒ์„ธ ํŽ˜์ด์ง€ ํŒŒ์ผ ์ƒ์„ฑ 2. ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€(index.js) ์ƒ์„ธ ํŽ˜์ด์ง€๋Š” App.vue์— ๋“ฑ๋กํ•˜์ง€ ์•Š๋Š”๋‹ค. import { createWebHistory, createRouter } from "vue-router"; import Home from '@/components/Home' import Join from '@/components/Join' import Login from '@/components/Login' import Logout from '@/components/Logout' import Registration from '@/components/Registration' import PlayerList from '@/components/Playe..

37. ์„ ์ˆ˜ ๋ชฉ๋ก ํŽ˜์ด์ง€๋„ค์ด์…˜

37. ์„ ์ˆ˜ ๋ชฉ๋ก ํŽ˜์ด์ง€๋„ค์ด์…˜ ํ˜„์žฌ ์„ ์ˆ˜ ๋ชฉ๋ก ์กฐํšŒ ์‹œ ์„ ์ˆ˜๊ฐ€ ํ•œ ํŽ˜์ด์ง€์— ๋ชจ๋‘ ๋‚˜ํƒ€๋‚˜๊ณ  ์žˆ์–ด ํŽ˜์ด์ง€๋„ค์ด์…˜์„ ์ด์šฉํ•ด ์—ฌ๋Ÿฌ ํŽ˜์ด์ง€์— ๋‚˜ํƒ€๋‚˜๋„๋ก ํ•œ๋‹ค. ๋ฐฑ์—”๋“œ ์„ ์ˆ˜ ์ „์ฒด ์กฐํšŒ ์ˆ˜์ •, ์ „์ฒด ์„ ์ˆ˜ ์ˆ˜ ์กฐํšŒ ์ถ”๊ฐ€ 1. PlayerRepositoy //์„ ์ˆ˜ ์ „์ฒด ์กฐํšŒ List findAllByOrderByPlayernoDesc(Pageable pageable); //์„ ์ˆ˜ ์ „์ฒด ์ˆ˜ ์กฐํšŒ Long countAllByOrderByPlayernoDesc(); 2. PlayerService //์„ ์ˆ˜ ์ „์ฒด ์ •๋ณด ์กฐํšŒ public List getPlayerAll(Pageable pageable); //์„ ์ˆ˜ ์ „์ฒด ์ˆ˜ ์กฐํšŒ public Long getTotalPage(); 3. PlayerServiceImpl //์„ ์ˆ˜ ์ „์ฒด ์ •๋ณด ..

36. ์„ ์ˆ˜ ๋ชฉ๋ก

36. ์„ ์ˆ˜ ๋ชฉ๋ก 12. ์„ ์ˆ˜ 1๋ช…, ์ „์ฒด ์กฐํšŒ ์—ฐ๋™ ์„ ์ˆ˜ ๋ชฉ๋ก ํŽ˜์ด์ง€ ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€ 1. ์„ ์ˆ˜ ๋ชฉ๋ก ํŒŒ์ผ ์ƒ์„ฑ 2. ๋ผ์šฐํ„ฐ ์ถ”๊ฐ€ 2-1. index.js import { createWebHistory, createRouter } from "vue-router"; import Home from '@/components/Home' import Join from '@/components/Join' import Login from '@/components/Login' import Logout from '@/components/Logout' import Registration from '@/components/Registration' import PlayerList from '@/components/PlayerL..