# [Spring Boot] SpringApplication


์Šคํ”„๋ง ๋ถ€ํŠธ๋กœ ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰ํ•  ๋•Œ Application ํด๋ž˜์Šค๋ฅผ ๋งŒ๋“ ๋‹ค.

ํด๋ž˜์Šค๋ช…์€ ๊ฐœ๋ฐœ์ž๊ฐ€ ํ”„๋กœ์ ํŠธ์— ๋งž๊ฒŒ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์ง€๋งŒ, ํฐ ํ‹€์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

@SpringBootApplication
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

}

@SpringBootApplication ์–ด๋…ธํ…Œ์ด์…˜์„ ํ†ตํ•ด ์Šคํ”„๋ง Bean์„ ์ฝ์–ด์™€ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•ด์ค€๋‹ค.

์ด ์–ด๋…ธํ…Œ์ด์…˜์ด ์žˆ๋Š” ํŒŒ์ผ ์œ„์น˜๋ถ€ํ„ฐ ์„ค์ •๋“ค์„ ์ฝ์–ด๊ฐ€๋ฏ€๋กœ, ๋ฐ˜๋“œ์‹œ ํ”„๋กœ์ ํŠธ์˜ ์ตœ์ƒ๋‹จ์— ๋งŒ๋“ค์–ด์•ผ ํ•œ๋‹ค.

SpringApplication.run()์œผ๋กœ ํ•ด๋‹น ํด๋ž˜์Šค๋ฅผ runํ•˜๋ฉด, ๋‚ด์žฅ WAS๋ฅผ ์‹คํ–‰ํ•œ๋‹ค. ๋‚ด์žฅ WAS์˜ ์žฅ์ ์œผ๋กœ๋Š” ๊ฐœ๋ฐœ์ž๊ฐ€ ๋”ฐ๋กœ ํ†ฐ์บฃ๊ณผ ๊ฐ™์€ ์™ธ๋ถ€ WAS๋ฅผ ์„ค์น˜ ํ›„ ์„ค์ •ํ•ด๋‘์ง€ ์•Š์•„๋„ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‹คํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.

๋˜ํ•œ, ์™ธ์žฅ WAS๋ฅผ ์‚ฌ์šฉํ•  ์‹œ ์ด ํ”„๋กœ์ ํŠธ๋ฅผ ์‹คํ–‰์‹œํ‚ค๊ธฐ ์œ„ํ•œ ์„œ๋ฒ„์—์„œ ๋ชจ๋‘ ์™ธ์žฅ WAS์˜ ์ข…๋ฅ˜์™€ ๋ฒ„์ „, ์„ค์ •์„ ์ผ์น˜์‹œ์ผœ์•ผ๋งŒ ํ•œ๋‹ค. ๋”ฐ๋ผ์„œ ๋‚ด์žฅ WAS๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ด๋Ÿฐ ์‹ ๊ฒฝ์€ ์“ฐ์ง€ ์•Š์•„๋„ ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋งค์šฐ ํŽธ๋ฆฌํ•˜๋‹ค.

์‹ค์ œ๋กœ ๋งŽ์€ ํšŒ์‚ฌ๋“ค์ด ์ด๋Ÿฐ ์žฅ์ ์„ ์‚ด๋ ค ๋‚ด์žฅ WAS๋ฅผ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๊ณ , ์ „ํ™˜ํ•˜๊ณ  ์žˆ๋‹ค.

์ตœ์ข… ์ˆ˜์ • : 12/17/2022, 7:23:59 AM