728x90

8. Introducing Spring Boot

Spring Boot makes it easy to create stand-alone, production-grade Spring-based Applications that you can run. We take an opinionated view of the Spring platform and third-party libraries, so that you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

You can use Spring Boot to create Java applications that can be started by using java -jar or more traditional war deployments. We also provide a command line tool that runs “spring scripts”.

Our primary goals are:

  • Provide a radically faster and widely accessible getting-started experience for all Spring development.
  • Be opinionated out of the box but get out of the way quickly as requirements start to diverge from the defaults.
  • Provide a range of non-functional features that are common to large classes of projects (such as embedded servers, security, metrics, health checks, and externalized configuration).
  • Absolutely no code generation and no requirement for XML configuration.

9. System Requirements

Spring Boot 2.0.3.RELEASE requires Java 8 or 9 and Spring Framework 5.0.7.RELEASE or above. Explicit build support is provided for Maven 3.2+ and Gradle 4.

9.1 Servlet Containers

Spring Boot supports the following embedded servlet containers:

You can also deploy Spring Boot applications to any Servlet 3.1+ compatible container.

 

8. 스프링 부트 소개

스프링 부트는 만들기 쉽게 합니다. 독립형의, 제품 수준의 스프링 기반의 어플리케이션을, 당신이 실행할 수 있는

우리는 스프링 플랫폼의 여러 라이브러리의 의견을 수렴하여, 당신이 힘들지 않게 시작할수 있게 했습니다. 

대부분의 스프링 부트 어플리케이션은 작은 스프링 환경설정만을 필요로 합니다. 

당신은 스프링 부트를 이용할 수 있습니다. 자바 어플리케이션을 만들때, "java -jar" 나 더 전통적인 war 를 디플로이(전개)하는 방법으로. 

우리는 또한 “spring scripts”.라 불리는 커멘드 라인 툴(cmd 툴)도 제공합니다. 

우리의 주 목적:

    • 급격히 빠르고 광범위하게 접근가능하게 시작할 수 있는 경험을 모든 스프링개발자에게 제공
    • opinionated view : 요구사항의에 맞게 기본설정에서 빠르게 벗어날수 있다. 
    • 비 함수적 기능- 보통 많은 클래스의 프로젝트-범위를 제공합니다. 임베디드서버, 보안, 메트릭스, 상태체크, 외부 환경설정과 같은
    • 전혀, XML환경설정을 위한 코드작성과 필수조건들이 없습니다. 

9. 시스템 요구사항

(스프링 부트 2.0.3.RELEASE 일때)

9.1 서블릿 컨테이너

Java 8, 9 , Spring Framework 5.0.7 , 메이븐 3.2 Gradle 4

Tomcat 8.5 , 서블릿 3.1 이상

stand-alone  독립형의

opinionated view 고집있는, 독선적인  =opinionated out of the box

convention 관습, 관례

production-grade 제품수준의

fuss 불평, 화, 안달하다. 

take an objective view 객관적으로 보다. 

deployments 전개, 배치

primary goals  주목적

radically  근복적인, 과격한, 급진주의의

diverge   벗어나다, 나뉘다. 갈라지다.

https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/htmlsingle/#getting-started-introducing-spring-boot

 

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.example</groupId>
	<artifactId>myproject</artifactId>
	<version>0.0.1-SNAPSHOT</version>

	<!-- Inherit defaults from Spring Boot -->
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.3.RELEASE</version>
	</parent>

	<!-- Add typical dependencies for a web application -->
	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
	</dependencies>

	<!-- Package as an executable jar -->
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

</project>
@SpringBootApplication
public class SpringBootGettingStartedApplication {

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

}

https://docs.spring.io/spring-boot/docs/2.0.3.RELEASE/reference/htmlsingle/#getting-started-maven-installation

 

Spring Boot Reference Guide

This section dives into the details of Spring Boot. Here you can learn about the key features that you may want to use and customize. If you have not already done so, you might want to read the "Part II, “Getting Started”" and "Part III, “Using Spring Boot

docs.spring.io

 

http://start.spring.io

불러오는 중입니다...

메이븐 기본 프로젝트 구조와 동일 

● 소스 코드 (src\main\java) 

● 소스 리소스 (src\main\resource) 

● 테스트 코드 (src\test\java) 

● 테스트 리소스 (src\test\resource) 
 
메인 애플리케이션 위치 

● 기본 패키지 - ex) me.fun.springbootgettingstarted;   

>> 이 위치부터 스캔시작, 다른 위치의 경우 컴포넌트 스캔이 안됨. 

+ Recent posts