download:Go微服务入门到容器化实际
1.什么是spring boot
简略的说,spring boot就是整合了很多优良的框架,不必咱们本人手动的去写一堆xml配置而后进行配置。
从实质上来说,Spring Boot就是Spring,它做了那些没有它你也会去做的Spring Bean配置。它应用“习惯优于配置”(我的项目中存在大量的配置,此外还内置了一个习惯性的配置,让你无需手动进行配置)的理念让你的我的项目疾速运行起来。使 用Spring Boot很容易创立一个独立运行(运行jar,内嵌Servlet容器)、准生产级别的基于Spring框架的我的项目,应用Spring Boot你能够不必或者只须要很少的Spring配置。
Spring Boot精要
Spring将很多魔法带入了Spring应用程序的开发之中,其中最重要的是以下四个外围。
主动配置:针对很多Spring应用程序常见的利用性能,Spring Boot能主动提供相干配置
起步依赖:通知Spring Boot须要什么性能,它就能引入须要的库。
命令行界面:这是Spring Boot的可选个性,借此你只需写代码就能实现残缺的应用程序,无需传统我的项目构建。
Actuator:让你可能深刻运行中的Spring Boot应用程序,一探到底。
动静语言:不须要编译,间接运行,比方JS。
动态语言:先编译再运行。
配置指的是xml配置,低下的开发效率指的是编写完代码之后须要进行大量的xml配置,然而单从写代码而言,Java开发效率还是比拟高的,因为有许多写好的第三方jar包。
微服务:将子系统拆成一个一个的jar包运行就是微服务。
2.优缺点
—————————第二种意识————————-
1 . springboot简略介绍(http://projects.spring.io/spr…)
当初的web我的项目简直都会用到spring框架,而要应用spring不免须要配置大量的xml配置文件,而 springboot的呈现解 决了这一问题,一个我的项目甚至不必部署到服务器上间接开跑,真像springboot所说:“just run”。
springboot的很多默认编码方式都是utf-8,真是福利啊。
org.spring 2013年新开发的框架springboot , 它让一个独自我的项目的创立变得更加的简略,让所有依赖spring的程序能够做到“just run”。springboot提供大量第三方libraries让咱们能够十分轻松的开始创立一个spring工程,甚至不须要再去配置一些繁琐的 xml配置文件
框架特点:
1:创立独立的spring利用。
2:嵌入Tomcat, Jetty Undertow 而且不须要部署他们。
3:提供的“starters”poms来简化Maven配置
4:尽可能主动配置spring利用。
5:提供生产指标,强壮检查和内部化配置
6:相对没有代码生成和XML配置要求
2.SpringBoot运行环境
Spring Boot最新版能够运行在Java6+的环境下,然而Spring官网倡议应用Java8。
Servlet 容器
Name Servlet Version Java Version
Tomcat 8 3.1 Java 7+
Tomcat 7 3.0 Java 6+
Jetty 9 3.1 Java 7+
Jetty 8 3.0 Java 6+
Undertow 1.1 3.1 Java 7+
3.pringBoot反对哪些利用
应用SpringBoot能够疾速创立一般Java我的项目和Web我的项目,以及其余我的项目。
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-redis Support for the REDIS key-value data store, including spring-data-redis.
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-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.