๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Study

[IntelliJ] (Springboot) jsp ๋ณ€๊ฒฝ ํ›„ ์ฆ‰์‹œ ๋ฐ˜์˜ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

by JulesJ 2022. 2. 4.
728x90

intellij์—์„œ springboot ์›น ๊ฐœ๋ฐœ์„ ํ•˜๋ฉด์„œ jsp ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜๊ณ  ๋‚˜์„œ ๋ฐ”๋กœ ๋ฐ˜์˜์ด ๋˜์ง€ ์•Š๊ณ , 

์ˆ˜์ • ์ „ ํŒŒ์ผ ๋‚ด์šฉ์œผ๋กœ๋งŒ ๊ณ„์† ๋ณด์ด๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. 

์ด๋Ÿฐ ๊ฒฝ์šฐ ๋ฐ˜์˜์ด ๋น ๋ฅด๊ฒŒ ๋˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด ์—ฌ๋Ÿฌ ๋ถ€๋ถ„์„ ์ˆ˜์ •ํ•ด๋ด์•ผ ํ•œ๋‹ค.

 

*๊ฐœ๋ฐœํ™˜๊ฒฝ : Mac + IntelliJ*

 

1.  IntelliJ ์„ค์ • ์ˆ˜์ •ํ•˜๊ธฐ

(1) Run -> Edit configurations... ํด๋ฆญ

(2) On frame deactivation : Update classes and resources ๋กœ ๋˜์–ด์žˆ๋Š” ์ง€ ํ™•์ธํ•˜๊ธฐ.

 

 

2. IntelliJ ์„ค์ • ์ˆ˜์ •ํ•˜๊ธฐ 2

cmd + option + shift + /  ํ‚ค๋ฅผ ๋ˆ„๋ฅธ ํ›„ registry ํด๋ฆญ

compiler.automake.allow.parallel ํ•ญ๋ชฉ ์ฒดํฌ ํ™•์ธํ•˜๊ธฐ (ํ•„์ž์˜ ๊ฒฝ์šฐ ์ด ๋ถ€๋ถ„์€ ์ด๋ฏธ ์ฒดํฌ๋˜์–ด ์žˆ์—ˆ๋‹ค.)

 

 

3. devtools ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€

pom.xml์— dependency๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

(ํ˜น์€ ์ถ”๊ฐ€๋˜์–ด์žˆ๋Š” ์ง€ ํ™•์ธํ•œ๋‹ค. ํ•„์ž๋Š” ํ”„๋กœ์ ํŠธ ์‹œ์ž‘ ์‹œ ์ถ”๊ฐ€ํ•œ ๊ทธ๋Œ€๋กœ๊ฐ€ ์•„๋ž˜์™€ ๊ฐ™์•˜๋‹ค.)

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
	<scope>runtime</scope>
	<optional>true</optional>
</dependency>

 

optional, scope ์„ค์ •์ด ํ•„์š”ํ•˜์ง€ ์•Š๋‹ค๋ฉด dependency๋ฅผ ์•„๋ž˜์™€ ๊ฐ™์ด ์ถ”๊ฐ€ํ•˜๊ณ  ํ™•์ธํ•ด๋ณด๋ฉด ๋  ๊ฒƒ ๊ฐ™๋‹ค!

<dependency>
	<groupId>org.springframework.boot</groupId>
	<artifactId>spring-boot-devtools</artifactId>
</dependency>

 

 

์œ„ dependency(devtools)๋ฅผ ์ถ”๊ฐ€ํ•œ ํ›„ application.properties์— ์•„๋ž˜ ์ฝ”๋“œ๋ฅผ ์ถ”๊ฐ€ํ•œ๋‹ค.

spring.devtools.livereload.enabled=true

 

 

References

  • https://goddaehee.tistory.com/243 ([IntelliJ] IntelliJ ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€ํ•˜๊ธฐ(SpringBoot ์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€) / 2022.02.04

 

 

๋๐Ÿง

 

๋Œ“๊ธ€