Springboot (a)--introduction to the knowledge point

Source: Internet
Author: User
Tags aop apache solr solr gemfire facebook support value store

First, Introduction

Spring boot is designed to simplify the creation, running, debugging, deployment, and so on of spring applications, and it allows you to focus on the development of spring applications without having to focus too much on the configuration of the XML. Simply put, it provides a bunch of dependencies that are packaged and have been resolved according to usage habits---habits more than conventions.

Spring Boot uses Tomcat as the server by default and uses Logback to provide logging.

Spring Boot provides a range of dependency packages, so support for building tools is required: Maven or Gradle.

Second, Springboot starter

1) Spring-boot-starter This is the core launcher for spring boot, which includes automatic configuration, logging, and Yaml.
2) Spring-boot-starter-actuator helps monitor and manage applications.
3) SPRING-BOOT-STARTER-AMQP supports the AMQP protocol (Advanced Message Queuing Protocol) through Spring-rabbit.
4) SPRING-BOOT-STARTER-AOP supports aspect-oriented programming i.e. AOP, including SPRING-AOP and ASPECTJ.
5) Spring-boot-starter-artemis supports the JMS API via Apache Artemis (Java Message Service API).
6) Spring-boot-starter-batch supports spring batch, including the HSQLDB database.
7) Spring-boot-starter-cache supports spring's cache abstraction.
8) Spring-boot-starter-cloud-connectors supports spring cloud connectors, simplifying the connection of services on cloud platforms such as cloud Foundry or Heroku.
9) Spring-boot-starter-data-elasticsearch supports Elasticsearch search and analysis engine, including Spring-data-elasticsearch.
Spring-boot-starter-data-gemfire supports GemFire distributed data storage, including Spring-data-gemfire.
One) SPRING-BOOT-STARTER-DATA-JPA supports JPA (Java Persistence API), including SPRING-DATA-JPA, Spring-orm, Hibernate.
SPRING-BOOT-STARTER-DATA-MONGODB supports MongoDB data, including Spring-data-mongodb.
Spring-boot-starter-data-rest through SPRING-DATA-REST-WEBMVC, supports exposing the spring data warehouse through rest.
SPRING-BOOT-STARTER-DATA-SOLR supports the Apache SOLR search platform, including SPRING-DATA-SOLR.
Spring-boot-starter-freemarker supports the Freemarker template engine.
Spring-boot-starter-groovy-templates supports the groovy template engine.
Spring-boot-starter-hateoas supports Hateoas-based restful Web services through Spring-hateoas.
SPRING-BOOT-STARTER-HORNETQ supports JMS through HORNETQ.
Spring-boot-starter-integration supports a common spring-integration module.
SPRING-BOOT-STARTER-JDBC supports the JDBC database.
Spring-boot-starter-jersey supports the Jersey RESTful Web services Framework.
Spring-boot-starter-jta-atomikos supports JTA Distributed transaction processing through Atomikos.
Spring-boot-starter-jta-bitronix) supports JTA Distributed transaction processing through Bitronix.
Spring-boot-starter-mail supports Javax.mail modules.
Spring-boot-starter-mobile supports Spring-mobile.
Spring-boot-starter-mustache supports the Mustache template engine.
Spring-boot-starter-redis supports the Redis key-value store database, including Spring-redis.
Spring-boot-starter-security supports spring-security.
) Spring-boot-starter-social-facebook Support Spring-social-facebook
() Spring-boot-starter-social-linkedin Support Pring-social-linkedin
) Spring-boot-starter-social-twitter Support Pring-social-twitter
Spring-boot-starter-test supports regular test dependencies, including JUnit, Hamcrest, Mockito, and spring-test modules.
Spring-boot-starter-thymeleaf supports the Thymeleaf template engine, including integration with spring.
Spring-boot-starter-velocity supports the Velocity template engine.
Spring-boot-starter-web supports full-stack web development, including Tomcat and SPRING-WEBMVC.
Spring-boot-starter-websocket supports WebSocket development.
PNS) SPRING-BOOT-STARTER-WS supports spring Web Services.

Third, springboot annotations

@SpringBootApplication: Contains @componentscan, @Configuration, and @enableautoconfiguration annotations. Where @componentscan let spring boot scan to the configuration class and add it to the program context.
@Configuration an XML configuration file that is equivalent to spring and can be checked for type safety using Java code.
@EnableAutoConfiguration automatic configuration.
@ComponentScan component scans to automatically discover and assemble some beans.
@Component can be used with Commandlinerunner to perform some basic tasks after the program starts.
@RestController annotations are collections of @controller and @responsebody, which means that this is a controller bean, and that it is a rest-style controller that fills the return value of the function directly into the HTTP response body.
@Autowired Auto-Import.
@PathVariable get parameters.
@JsonBackReference Resolve nested outer chain issues.
@RepositoryRestResourcepublic used in conjunction with Spring-boot-starter-data-rest.
@EnableAutoConfiguration: Spring Boot automatic configuration (auto-configuration): Try to automatically configure your spring app based on the jar dependencies you add. For example, if HSQLDB is present under your classpath and you do not manually configure any database connection beans, then we will automatically configure a memory-type (in-memory) database. You can add @enableautoconfiguration or @springbootapplication annotations to a @configuration class. This comment tells Springboot "guess" how you would like to configure spring, based on the jar dependencies you have added. If Spring-boot-starter-web has added Tomcat and spring MVC, this annotation automatically assumes that you are developing a Web application and adding the appropriate spring settings. The dynamic configuration is designed to work better with "starters", but these two concepts are not directly related. You are free to pick a jar package other than starter dependencies, and Springboot will still try to automatically configure your application.

  @Bean: The equivalent of a bean in XML, placed on top of the method, rather than a class, which means producing a bean and handing it over to spring management.

Springboot (a)--introduction to the knowledge point

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.