{"componentChunkName":"component---src-templates-blog-post-js","path":"/springboot/스프링-부트-소개/","result":{"data":{"site":{"siteMetadata":{"title":"Bottlehs Tech Blog","description":"웹·앱·AI 개발자 전병훈(bottlehs)의 기술 블로그. AI·LLM, JavaScript·Vue, Spring Boot, 알고리즘, 블록체인 실무 가이드를 다룹니다","siteUrl":"https://www.bottlehs.dev","author":{"name":"Jeon Byung Hun","summary":"개발을 즐기는 bottlehs - Engineer, MS, AI, FE, BE, OS, IOT, Blockchain, 설계, 테스트"},"social":{"github":"bottlehs","codepen":"bottlehs"}}},"markdownRemark":{"id":"4cbbd7ca-a2d4-56a4-9151-5611caf15e41","excerpt":"…","html":"<p><img src=\"/assets/springboot.png\" alt=\"스프링 부트 소개\" title=\"스프링 부트 소개\"></p>\n<p>스프링부트는 최소한의 설정으로 스프링 플랫폼과 서드파티 라이브러리들을 사용 할 수 있도록 고안된 프레임워크 이다. 즉 스프링 부트는 환경 설정을 최소화하고 개발자가 비즈니스 로직에 집중할 수 있게하여 생산성을 크게 향상시켜준다.</p>\n<h3 id=\"스프링이란\" style=\"position:relative;\"><a href=\"#%EC%8A%A4%ED%94%84%EB%A7%81%EC%9D%B4%EB%9E%80\" aria-label=\"스프링이란 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>스프링이란?</h3>\n<p>스프링은 프레임워크이다. 프레임워크와 라이브러리의 차이는 아래와 같다.</p>\n<p><strong>프레임워크</strong>\n프레임워크는 라이브러리를 포함하는 개념이고, 개발자가 만든 코드를 사용한다. 코드를 어떻게 실행하는지는 코드를 사용하는 프레임워크에 달려있다.</p>\n<p><strong>라이브러리</strong>\n라이브러리는 간단하게 특정 기능을 하는 코드 뭉치이다. 개발자는 자기 코드에 라이브러리를 포함시키고 원하는 기능을 사용해서 개발을 할 수 있다. 더욱 간단하게는 원하는 기능을 하는 함수를 콜해서 사용하는 것으로 라이브러리를 활용한다.</p>\n<p>즉 스프링 프레임워크는 여러 라이브러리를 제공하고, 그것을 활용해서 개발한 프로그램을 동작시킨다. 스프링 프레임워크의 위키백과 정의는 아래와 같다.</p>\n<p>스프링 프레임워크는 자바 플랫폼을 위한 오픈 소스 애플리케이션 프레임워크로서 간단히 스프링이라고도 한다. 동적인 웹 사이트를 개발하기 위한 여러 가지 서비스를 제공하고 있다.</p>\n<h3 id=\"주요-특징\" style=\"position:relative;\"><a href=\"#%EC%A3%BC%EC%9A%94-%ED%8A%B9%EC%A7%95\" aria-label=\"주요 특징 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>주요 특징</h3>\n<p>스프링부트의 특징은 아래와 같다.</p>\n<ul>\n<li>독립 실행이 가능한 스프링 애플리케이션 개발 (Embedded Tomcat, Jetty, Undertow를 사용)</li>\n<li>통합 Starter를 제공하여 Maven/Gradle 구성을 간소화</li>\n<li>Starter를 통한 자동화된 스프링 설정 제공</li>\n<li>번거로운 XML 설정을 요구하지 않음</li>\n<li>JAR을 이용하여 자바 옵션만으로도 배포 가능</li>\n<li>Spring Actuator 제공 (애플리케이션의 모니터링과 관리를 위해 사용)</li>\n</ul>\n<h3 id=\"스프링과-스프링부트\" style=\"position:relative;\"><a href=\"#%EC%8A%A4%ED%94%84%EB%A7%81%EA%B3%BC-%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8\" aria-label=\"스프링과 스프링부트 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>스프링과 스프링부트</h3>\n<p>스프링 부트는 스프링 프레임워크 내에서 설정을 간소화한 도구라고 볼 수 있다.</p>\n<p><strong>장점</strong></p>\n<ul>\n<li>각각의 의존성 버전을 수월하게 올리는 것이 가능 스프링 부트의 버전이 올라갈 때마다 각 버전별 호환성에 대해 충분한 테스트를 거친 뒤 release 기존에 각각 수동으로 설정했던 버전 관리에 비해서 안정된 버전 제공을 보장받을 수 있다.</li>\n<li>간단한 어노테이션/프로퍼티 설정으로 원하는 기능을 빠르게 적용 가능 하다.</li>\n<li>별도의 외장 톰캣을 설치할 필요가 없고 톰캣 버전도 편리하게 관리 가능 하다.</li>\n<li>특정 라이브러리에 버그가 있더라도 이후에 스프링팀으로부터 bugfix 된 버전을 받기에 편리하다.</li>\n</ul>\n<p><strong>단점</strong></p>\n<ul>\n<li>설정을 커스터마이징하는 경우 기존의 스프링 프레임워크를 사용하는 것과 같은 불편함이 있을 수 있다.</li>\n<li>설정을 변경하고 싶은 경우 내부 코드를 살펴봐야하는 불편함이 있을 수 있다.</li>\n</ul>\n<h3 id=\"스프링부트-시작하기\" style=\"position:relative;\"><a href=\"#%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0\" aria-label=\"스프링부트 시작하기 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>스프링부트 시작하기</h3>\n<p><a href=\"https://spring.io/quickstart\"><strong>https://spring.io/quickstart</strong></a> 링크로 접속하여 순서에 맞게 해보면 쉽게 시작이 가능하다.\n스프링스타터를 활용하면 의존 관계를 간단히 설정 할수 있다.</p>\n<h3 id=\"스프링부트-스타터-종류\" style=\"position:relative;\"><a href=\"#%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-%EC%8A%A4%ED%83%80%ED%84%B0-%EC%A2%85%EB%A5%98\" aria-label=\"스프링부트 스타터 종류 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>스프링부트 스타터 종류</h3>\n<p><a href=\"https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-starters\"><strong>https://github.com/spring-projects/spring-boot/tree/master/spring-boot-project/spring-boot-starters/</strong></a> 에서 확인 가능하다.</p>\n<p><strong>주요 스타터</strong></p>\n<ul>\n<li>spring-boot-starter-web-services : SOAP 웹 서비스</li>\n<li>spring-boot-starter-web : Web, RESTful 응용프로그램</li>\n<li>spring-boot-starter-test : Unit testing, Integration Testing</li>\n<li>spring-boot-starter-jdbc : 기본적인 JDBC</li>\n<li>spring-boot-starter-hateoas : HATEOAS 기능을 서비스에 추가</li>\n<li>spring-boot-starter-security : 스프링 시큐리티를 이용한 인증과 권한</li>\n<li>spring-boot-starter-data-jpa : Spring Data JPA with Hibernate</li>\n<li>spring-boot-starter-cache : 스프링 프레임워크에 캐싱 지원 가능</li>\n<li>spring-boot-starter-data-rest : Spring Data REST를 사용하여 간단한 REST 서비스 노출</li>\n</ul>\n<p><strong>전체 스타터</strong></p>\n<ul>\n<li>spring-boot-starter-activemq</li>\n<li>spring-boot-starter-actuator</li>\n<li>spring-boot-starter-amqp</li>\n<li>spring-boot-starter-aop</li>\n<li>spring-boot-starter-artemis</li>\n<li>spring-boot-starter-batch</li>\n<li>spring-boot-starter-cache</li>\n<li>spring-boot-starter-data-cassandra-reactive</li>\n<li>spring-boot-starter-data-cassandra</li>\n<li>spring-boot-starter-data-couchbase-reactive</li>\n<li>spring-boot-starter-data-couchbase</li>\n<li>spring-boot-starter-data-elasticsearch</li>\n<li>spring-boot-starter-data-jdbc</li>\n<li>spring-boot-starter-data-jpa</li>\n<li>spring-boot-starter-data-ldap</li>\n<li>spring-boot-starter-data-mongodb-reactive</li>\n<li>spring-boot-starter-data-mongodb</li>\n<li>spring-boot-starter-data-neo4j</li>\n<li>spring-boot-starter-data-r2dbc</li>\n<li>spring-boot-starter-data-redis-reactive</li>\n<li>spring-boot-starter-data-redis</li>\n<li>spring-boot-starter-data-rest</li>\n<li>spring-boot-starter-freemarker</li>\n<li>spring-boot-starter-groovy-templates</li>\n<li>spring-boot-starter-hateoas</li>\n<li>spring-boot-starter-integration</li>\n<li>spring-boot-starter-jdbc</li>\n<li>spring-boot-starter-jersey</li>\n<li>spring-boot-starter-jetty</li>\n<li>spring-boot-starter-jooq</li>\n<li>spring-boot-starter-json</li>\n<li>spring-boot-starter-jta-atomikos</li>\n<li>spring-boot-starter-log4j2</li>\n<li>spring-boot-starter-logging</li>\n<li>spring-boot-starter-mail</li>\n<li>spring-boot-starter-mustache</li>\n<li>spring-boot-starter-oauth2-client</li>\n<li>spring-boot-starter-oauth2-resource-server</li>\n<li>spring-boot-starter-parent</li>\n<li>spring-boot-starter-quartz</li>\n<li>spring-boot-starter-reactor-netty</li>\n<li>spring-boot-starter-rsocket</li>\n<li>spring-boot-starter-security</li>\n<li>spring-boot-starter-test</li>\n<li>spring-boot-starter-thymeleaf</li>\n<li>spring-boot-starter-tomcat</li>\n<li>spring-boot-starter-undertow</li>\n<li>spring-boot-starter-validation</li>\n<li>spring-boot-starter-web-services</li>\n<li>spring-boot-starter-web</li>\n<li>spring-boot-starter-webflux</li>\n<li>spring-boot-starter-websocket</li>\n<li>spring-boot-starter</li>\n</ul>\n<h3 id=\"gradle-과-maven\" style=\"position:relative;\"><a href=\"#gradle-%EA%B3%BC-maven\" aria-label=\"gradle 과 maven permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Gradle 과 Maven</h3>\n<p>Maven 예제가 많은 편이지만, Maven의 골, 페이즈만으로는 프로젝트의 필요한 기능을 모두 지원하지 못할 수도 있다. Gradle은 Groovy DSL로 구성되어 있어서 그루비를 익혀야하지만, 지원되는 기능을 익히고 나면 훨씬 강력해진다.\nGradle 과 Maven 의 차이는 따로 포스팅 할 예정이다.</p>\n<h3 id=\"배포형태\" style=\"position:relative;\"><a href=\"#%EB%B0%B0%ED%8F%AC%ED%98%95%ED%83%9C\" aria-label=\"배포형태 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>배포형태</h3>\n<p>배포형태에 따라서 war 또는 jar 로 나눠 진다. 기본적으로는 단독실행가능지만, 톰캣 서버를 따로 구축하고 배포 할때는 일반적으로 war 로 배포 한다.\nwar 와 jar 의 차이점은 따로 포스팅 할 예정이다.</p>\n<h3 id=\"스프링-부트-버전\" style=\"position:relative;\"><a href=\"#%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EB%B2%84%EC%A0%84\" aria-label=\"스프링 부트 버전 permalink\" class=\"anchor-header before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>스프링 부트 버전</h3>\n<p>스프링부트 버전확인은 <a href=\"https://github.com/spring-projects/spring-boot/wiki\"><strong>https://github.com/spring-projects/spring-boot/wiki</strong></a> 에서 확인이 가능하다.</p>\n<p>현재 버전은 아래와 같다.</p>\n<ul>\n<li>v2.5 (preview)</li>\n<li>v2.4</li>\n<li>v2.3</li>\n<li>v2.2</li>\n</ul>","tableOfContents":"<ul>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%8A%A4%ED%94%84%EB%A7%81%EC%9D%B4%EB%9E%80\">스프링이란?</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%A3%BC%EC%9A%94-%ED%8A%B9%EC%A7%95\">주요 특징</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%8A%A4%ED%94%84%EB%A7%81%EA%B3%BC-%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8\">스프링과 스프링부트</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0\">스프링부트 시작하기</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%8A%A4%ED%94%84%EB%A7%81%EB%B6%80%ED%8A%B8-%EC%8A%A4%ED%83%80%ED%84%B0-%EC%A2%85%EB%A5%98\">스프링부트 스타터 종류</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#gradle-%EA%B3%BC-maven\">Gradle 과 Maven</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EB%B0%B0%ED%8F%AC%ED%98%95%ED%83%9C\">배포형태</a></li>\n<li><a href=\"/springboot/%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EC%86%8C%EA%B0%9C/#%EC%8A%A4%ED%94%84%EB%A7%81-%EB%B6%80%ED%8A%B8-%EB%B2%84%EC%A0%84\">스프링 부트 버전</a></li>\n</ul>","wordCount":{"words":514},"fields":{"slug":"/springboot/스프링-부트-소개/","image":"/assets/springboot.png","faq":[]},"frontmatter":{"title":"스프링 부트 소개","date":"2021년 3월 16일","dateISO":"2021-03-16T20:29:29.537Z","updatedISO":null,"category":"springboot","description":"스프링부트는 최소한의 설정으로 스프링 플랫폼과 서드파티 라이브러리들을 사용 할 수 있도록 고안된 프레임워크 이다. 즉 스프링 부트는 환경 설정을 최소화하고 개발자가 비즈니스 로직에 집중할 수 있게하여 생산성을 크게 향상시켜준다.","tags":["스프링","스프링부트","Spring","SpringBoot","Java","프레임워크"]}}},"pageContext":{"slug":"/springboot/스프링-부트-소개/","previous":{"fields":{"slug":"/etc/mac-mysql-명령어-정리/"},"frontmatter":{"title":"Mac MySQL 명령어 정리","tags":["MySQL","Mac"]}},"next":{"fields":{"slug":"/springboot/스프링-부트-custom-annotation/"},"frontmatter":{"title":"스프링 부트 Custom Annotation(커스텀 어노테이션), GET 요청 ~ JSON 응답","tags":["스프링","스프링부트","Spring","SpringBoot","Java","프레임워크","Custom Annotation","REST API"]}}}},"staticQueryHashes":["213619243","3262363727"]}