Understanding Spring Download

I am trying to understand the difference between spring boot and spring boot website . From this download tutorial, pom contains spring boot as the parent and spring boot website depending on the type:

<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.1.RELEASE</version> </parent> 
 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> </dependencies> 

What is the use for two different versions? Do you always use them together? This spring boot documentation tells me if the program is ready to use:

 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> </dependencies> 

But if so, then why doesn't he have a website like:

 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web-actuator</artifactId> </dependency> </dependencies> 
+8
source share
5 answers

There are a lot of these different β€œstarting” priests for spring boot. Each of them tells maven to make the dependencies necessary for this particular function. Thus, spring-boot-starter-web contains all the material needed for MVC and auto-configures it with reasonable defaults. The real trick to loading spring is when it auto-configures everything that uses the whole @ConditionalOnClass or other similar annotations that look at which dependencies are in the classpath and provides a configuration for these dependencies. This means that when you have this spring starter starter, when it performs its autoconfiguration, it will look at what other spring boot boot files you have in your pom.xml and it will configure different endpoints for the drive, so that you can see the various indicators that the drive provides for this particular module.

+13
source

Spring Boot is a framework, spring-boot-starter-web is one of the packages that comes with it, jar .

Just like the JDK is a library, and util is one of the packages included in the JDK.

+2
source

From: https://docs.spring.io

Spring Boot provides several "starters" that automatically configure your application, add banks to your class path. spring-boot-starter-parent is the main starter that provides useful maven defaults. It also provides a dependency management section, so if you import additional starters, you can omit version tags for "blessed" dependencies. Therefore, you only need to specify the Spring boot version number for this dependency

Starters are a set of convenient dependency descriptors that you can include in the application, given that each starter covers a specific area. Starters contain many dependencies that are needed to quickly launch a project and with a consistent, supported set of managed transitive dependencies. For example, if you want to start using Spring and JPA to access the database, just include the project "spring-boot-starter-data-jpa" in the project, and you're good to go. Spring Download spring-boot-starter-web is a starter for networking, including RESTful, applications using Spring MVC. It uses Tomcat as the default built-in container.

Spring Boot has different groups of starters, for example

1- Spring Launch boot applications : spring-boot-starter-web, spring-boot-starter-jdbc, spring-boot-starter-jpa etc

2- Spring Boot Starter Launchers: spring-boot-starter-actuator, which provides off-the-shelf production functions to help you monitor and control your application

3- Spring Boot technical start-up : spring-boot-starter-jetty, spring-boot-starter-tomcat, these starters can be used to eliminate or replace certain technical aspects

+2
source

Spring boot is a very cool Spring Source tool. In many conferences, talck's Spring Boot team is one of three Pivotal DSRs (Domain Specific Run-Time) .... Spring Boot, Spring XD, and Grails (Pivotal now doesn't support Groovy and Grails).

So, compare Spring loading yourself, and Spring loading the web environment can be a cool conversation. First of all, Spring boot gives you a lot of ready-made finished products, such as a drive (available whit sprin boot in a web environment), Spring remote, etc. The main difference is that it has a standalone Spring context or Spring web context. Of course, some potential features that you might have may be available in a web context, for example, Drive. but the main difference is what application you need, online or offline.

0
source

1.spring-boot-starter-parent deals with automatically starting the main method and startup methods, etc. 2.and spring-boot-starter-web deals with Spring MVC things like controller, auto-tuning, etc. Hope this helps ..

0
source

Source: https://habr.com/ru/post/1240640/


All Articles