2016년 3월 11일 금요일

Spring Boot ! what is this?

Spring Boot make it easy to create stand-alone, production-grade Spring base Application that you can “just run”.
We take an opionionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.

Features
  • Create stand-alone Spring applications
  • Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
  • Provide opinionated 'starter' POMs to simplify your Maven configuration
  • Automatically configure Spring whenever possible
  • Provide production-ready features such as metrics, health checks and externalized configuration
  • Absolutely no code generation and no requirement for XML configuration
from Spring Project


언제 사용하면 좋은가?
  • 언제, 어디서, 어떤 상황에서도 좋다.

간단한 Example
pom.xml
Spring Boot은 Starter 단위로 기능 Module을 추가한다. Web 기능 Module은 “spring-boot-starter-web”에 포함되어 있으며, 기본적으로 Tomcat이 embedded 되어 있다.
유일한 Spring boot 만의 Code

Controller : http://localhost:8080

Spring Boot Starters
Table 1. Spring Boot application starters
Name
Description
spring-boot-starter
The core Spring Boot starter, including auto-configuration support, logging and YAML.
spring-boot-starter-actuator
Production ready features to help you monitor and manage your application.
spring-boot-starter-amqp
Support for the “Advanced Message Queuing Protocol” via spring-rabbit.
spring-boot-starter-aop
Support for aspect-oriented programming including spring-aop and AspectJ.
spring-boot-starter-artemis
Support for “Java Message Service API” via Apache Artemis.
spring-boot-starter-batch
Support for “Spring Batch” including HSQLDB database.
spring-boot-starter-cache
Support for Spring’s Cache abstraction.
spring-boot-starter-cloud-connectors
Support for “Spring Cloud Connectors” which simplifies connecting to services in cloud platforms like Cloud Foundry and Heroku.
spring-boot-starter-data-elasticsearch
Support for the Elasticsearch search and analytics engine including spring-data-elasticsearch.
spring-boot-starter-data-gemfire
Support for the GemFire distributed data store including spring-data-gemfire.
spring-boot-starter-data-jpa
Support for the “Java Persistence API” including spring-data-jpa, spring-orm and Hibernate.
spring-boot-starter-data-mongodb
Support for the MongoDB NoSQL Database, including spring-data-mongodb.
spring-boot-starter-data-rest
Support for exposing Spring Data repositories over REST via spring-data-rest-webmvc.
spring-boot-starter-data-solr
Support for the Apache Solr search platform, including spring-data-solr.
spring-boot-starter-freemarker
Support for the FreeMarker templating engine.
spring-boot-starter-groovy-templates
Support for the Groovy templating engine.
spring-boot-starter-hateoas
Support for HATEOAS-based RESTful services via spring-hateoas.
spring-boot-starter-hornetq
Support for “Java Message Service API” via HornetQ.
spring-boot-starter-integration
Support for common spring-integration modules.
spring-boot-starter-jdbc
Support for JDBC databases.
spring-boot-starter-jersey
Support for the Jersey RESTful Web Services framework.
spring-boot-starter-jta-atomikos
Support for JTA distributed transactions via Atomikos.
spring-boot-starter-jta-bitronix
Support for JTA distributed transactions via Bitronix.
spring-boot-starter-mail
Support for javax.mail.
spring-boot-starter-mobile
Support for spring-mobile.
spring-boot-starter-mustache
Support for the Mustache templating engine.
spring-boot-starter-redis
Support for the REDIS key-value data store, including spring-redis.
spring-boot-starter-security
Support for spring-security.
spring-boot-starter-social-facebook
Support for spring-social-facebook.
spring-boot-starter-social-linkedin
Support for spring-social-linkedin.
spring-boot-starter-social-twitter
Support for spring-social-twitter.
spring-boot-starter-test
Support for common test dependencies, including JUnit, Hamcrest and Mockito along with the spring-testmodule.
spring-boot-starter-thymeleaf
Support for the Thymeleaf templating engine, including integration with Spring.
spring-boot-starter-velocity
Support for the Velocity templating engine.
spring-boot-starter-web
Support for full-stack web development, including Tomcat and spring-webmvc.
spring-boot-starter-websocket
Support for WebSocket development.
spring-boot-starter-ws
Support for Spring Web Services.

Table 2. Spring Boot production ready starters
Name
Description
spring-boot-starter-actuator
Adds production ready features such as metrics and monitoring.
spring-boot-starter-remote-shell
Adds remote ssh shell support.

Table 3. Spring Boot technical starters
Name
Description
spring-boot-starter-jetty
Imports the Jetty HTTP engine (to be used as an alternative to Tomcat).
spring-boot-starter-log4j
Support the Log4J logging framework.
spring-boot-starter-logging
Import Spring Boot’s default logging framework (Logback).
spring-boot-starter-tomcat
Import Spring Boot’s default HTTP engine (Tomcat).
spring-boot-starter-undertow
Imports the Undertow HTTP engine (to be used as an alternative to Tomcat).

결론
“Spring Boot takes an opinionated view of building production-ready Spring applications. Spring Boot favors convention over configuration and is designed to get you up and running as quickly as possible.”

“Spring Boot을 써야 한다.”

댓글 없음:

댓글 쓰기

시스템 부팅시 도커 컨테이너 자동 실행

Docker 컨테이너를 운용중인 시스템이 Reboot 되버리면 컨테이너가 자동으로 올라오지 않아 불편해서 시스템 리붓시 컨테이너를 자동으로 시작되게 init 데몬에 등록하기로 했습니다. 서버는 Ubuntu 17.10 Docker는 17.0...