Home ๐Ÿ” application.yml ๋ถ„๋ฆฌ
Post
Cancel

๐Ÿ” application.yml ๋ถ„๋ฆฌ



๋ฐฉ๋ฒ• 1



์„ค์ •์„ ํ•œ applicaiton.yml ์—์„œ ์ด๋Ÿฌํ•œ ๋ฐฉ์‹์œผ๋กœ ๋ถ„๋ฆฌํ•ด ์ฃผ๋Š” ๋ฐฉ์‹๊ณผ


1
2
3
4
5
6
7
8
9
10
11
12
# version 1
server:
  port: 8080

  ...

---
# version 2
server:
  port: 8080

	...



๋ฐฉ๋ฒ• 2



๋‹ค์Œ๊ณผ ๊ฐ™์ด profile ๋‹จ์œ„๋กœ ํŒŒ์ผ ์ž์ฒด๋ฅผ ๋ถ„๋ฆฌํ•˜๋Š” ๋ฐฉ์‹์ด ์žˆ๋‹ค.

  • application.yml
  • applivation-dev.yml
  • applivation-test.yml


๋ถ„๋ฆฌ ํ›„ ์ ์šฉํ•  ํ”„๋กœํŒŒ์ผ์„ ์„ค์ •ํ•ด ์ฃผ์–ด์•ผ ํ•œ๋‹ค.


๊ทธ๋Ÿฌ๋ ค๋ฉด intellij์—์„œ ๊ตฌ์„ฑ ํŽธ์ง‘์— ๋“ค์–ด๊ฐ€

ํ™œ์„ฑํ™”๋œ ํ”„๋กœํŒŒ์ผ์— ๋‚ด๊ฐ€ ์ ์šฉํ•  application.yml์„ ์ž…๋ ฅํ•ด์ฃผ๋ฉด๋œ๋‹ค.


applivation-dev.yml๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด

dev๋ผ๊ณ  ์ž…๋ ฅํ•ด์ฃผ๋ฉด

ํ•ด๋‹น ํ”„๋กœํŒŒ์ผ์ด ์ ์šฉ๋˜ ์‹คํ–‰๋  ๊ฒƒ์ด๋‹ค!



This post is licensed under CC BY 4.0 by the author.

โ—ERROR - ๊นƒ๋ธ”๋กœ๊ทธ

/Database/ MAX+1๊ณผ ์‹œํ€€์Šค(Sequence) NEXTVAL