programing

스프링 부츠 스타터 항아리가 뭐죠?

css3 2023. 3. 6. 21:20

스프링 부츠 스타터 항아리가 뭐죠?

Spring Boot에는, 다음의 패턴에 몇개의 항아리가 있습니다.spring-boot-starter이 모든 항아리에는 패키지가 포함되어 있지 않습니다.무슨 소용이 있습니까?

Maven POM 에서는, 다음의 의존 관계가 추가됩니다.

  • org. springframework.부트: spring-boot-boot-web
  • org. springframework.부트: spring-boot-syslogs-syslogs
  • org. springframework.부트: spring-boot-security

실제로 어떤 스프링 부츠 병에서 기능을 사용해야 합니까?내 프로젝트에는 종속성 관리가 없습니다.저의 프로젝트는 Spring Security를 사용하는 Spring MVC 어플리케이션입니다.

이러한 의존관계는 필요한 모든 의존관계와 함께 애드혹스켈레톤 프로젝트에 통일된 엔트리를 제공하기 위한 것입니다.

일반적으로 프로젝트 기술자(pom.xml)에서 상속되므로 구성된 버전의 모든 부모 종속성을 얻을 수 있습니다.개발자 측에서는 더 이상 부담을 주지 않습니다.

스타터 POM은 어플리케이션에 포함할 수 있는 편리한 의존관계 기술자 세트입니다.필요한 모든 스프링 및 관련 기술을 원스톱으로 이용할 수 있습니다.샘플 코드를 검색하여 의존관계 기술자의 페이스트 로드를 복사할 필요가 없습니다.예를 들어 데이터베이스 액세스에 Spring 및 JPA를 사용하려면 프로젝트에 spring-boot-starter-data-jpa 종속성을 포함하면 됩니다.

레퍼런스, Spring Boot Starter POM.

편집:

이러한 POM은 특정 종류의 프로젝트에 사용할 수 있는 종속성을 합성하는 데 사용할 수 있습니다. 예를 들어, 단순한 Spring MVC 프로젝트의 경우 다음과 같은 아티팩트가 포함됩니다(각각 spring-boot-starter, spring-boot-starter-web, spring-boot-starter-security에서 읽음).

  • 스프링 부트 아티팩트:
    • org. springframework.부트: 스프링 부트
    • org. springframework.부트: spring-boot-autoconfigure
    • org. springframework.부트: spring-boot-syslogs-syslogs
  • Spring Core, Web, MVC, 보 spring :
    • org. springframework: 스프링코어
    • org.springframework: 스프링 웹
    • org.springframework: spring-webmvc
    • org. spring framework: 스프링빈
    • org. spring framework: 스프링 프레임
    • org. spring framework: 스프링 프레임
    • org. spring framework: spring-aop
    • org. springframework.보안: spring-security-config
    • org. springframework.보안: spring-security-web
    • org.validate: 증명서 검증자
    • com.sysml.syslog.core:syslog-syslogind

아티팩트는 매븐 중앙 저장소에서 검색 결과를 원활하게 탐색할 수 있습니다.

일부 구성 요소가 결합되어 아티팩트가 업데이트될 수 있으므로 완전한 참조 목록이 아닐 수 있습니다.

간단히 말하면, 이들은 어플리케이션의 일부 측면을 관리하는 라이브러리를 조합하는 데 걸리는 시간을 절약하기 위해 함께 동작하도록 테스트된 버전과의 과도적 의존관계를 나열하는 의존관계 기술자입니다.

또한 다음 명령을 사용하여 스프링 부트프로젝트 pom.xml 파일에 정의되어 있는 다양한 spring-boot-starter-*에 필요한 의존관계를 보고할 수도 있습니다.

mvn dependency:resolve

예를 들어 스프링 1.5.8입니다.RELEASE. 다음 병(및 버전)이 사용됩니다.

참고 형식은 그룹 ID:아티팩트 ID:버전:범위

The following files have been resolved:
    com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
    org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
    aopalliance:aopalliance:jar:1.0:compile
    org.hamcrest:hamcrest-library:jar:1.3:test
    org.mockito:mockito-core:jar:1.10.19:test
    org.assertj:assertj-core:jar:2.6.0:test
    org.springframework:spring-beans:jar:4.3.12.RELEASE:compile
    org.springframework.boot:spring-boot-test:jar:1.5.8.RELEASE:test
    org.springframework.boot:spring-boot-autoconfigure:jar:1.5.8.RELEASE:compile
    org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.8.RELEASE:compile
    org.skyscreamer:jsonassert:jar:1.4.0:test
    org.yaml:snakeyaml:jar:1.17:runtime
    com.fasterxml:classmate:jar:1.3.4:compile
    org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
    org.springframework.boot:spring-boot-starter-test:jar:1.5.8.RELEASE:test
    org.hamcrest:hamcrest-core:jar:1.3:test
    com.jayway.jsonpath:json-path:jar:2.2.0:test
    org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.23:compile
    org.springframework.boot:spring-boot:jar:1.5.8.RELEASE:compile
    org.apache.tomcat:tomcat-annotations-api:jar:8.5.23:compile
    org.springframework:spring-context:jar:4.3.12.RELEASE:compile
    org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
    javax.validation:validation-api:jar:1.1.0.Final:compile
    org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.23:compile
    org.springframework.boot:spring-boot-starter-logging:jar:1.5.8.RELEASE:compile
    com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
    org.ow2.asm:asm:jar:5.0.3:test
    org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.23:compile
    org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
    org.springframework:spring-web:jar:4.3.12.RELEASE:compile
    ch.qos.logback:logback-core:jar:1.1.11:compile
    org.springframework.security:spring-security-core:jar:4.2.3.RELEASE:compile
    org.springframework:spring-test:jar:4.3.12.RELEASE:test
    org.springframework.boot:spring-boot-starter:jar:1.5.8.RELEASE:compile
    org.springframework.security:spring-security-test:jar:4.2.3.RELEASE:test
    org.springframework.boot:spring-boot-starter-web:jar:1.5.8.RELEASE:compile
    org.springframework:spring-core:jar:4.3.12.RELEASE:compile
    org.springframework.boot:spring-boot-starter-security:jar:1.5.8.RELEASE:compile
    org.springframework.boot:spring-boot-actuator:jar:1.5.8.RELEASE:compile
    org.objenesis:objenesis:jar:2.1:test
    org.springframework:spring-expression:jar:4.3.12.RELEASE:compile
    org.springframework.boot:spring-boot-starter-actuator:jar:1.5.8.RELEASE:compile
    org.springframework.security:spring-security-config:jar:4.2.3.RELEASE:compile
    org.springframework.security:spring-security-web:jar:4.2.3.RELEASE:compile
    org.springframework:spring-aop:jar:4.3.12.RELEASE:compile
    junit:junit:jar:4.12:test
    org.slf4j:slf4j-api:jar:1.7.25:compile
    net.minidev:json-smart:jar:2.2.1:test
    org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.8.RELEASE:test
    net.minidev:accessors-smart:jar:1.1:test
    org.springframework:spring-webmvc:jar:4.3.12.RELEASE:compile
    ch.qos.logback:logback-classic:jar:1.1.11:compile
    org.slf4j:jul-to-slf4j:jar:1.7.25:compile
    com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile

배포에 대한 테스트 범위가 있는 자르는 무시하십시오.

스프링 부트 프로젝트가 없다면 Spring Initializr에서 필요한 스프링 부트 스타터를 사용하여 하나만 생성하십시오.또한 maven 명령어를 랩하는 maven 래퍼를 사용하여 maven을 개별적으로 설정 및 설치할 수 있습니다.

따라서 Spring Initializr에서 zip 파일을 다운로드하고 압축 해제된 폴더에서 명령 프롬프트를 열고 대신 다음 명령을 사용합니다.

Linux/Mac OS의 경우

 ./mvnw dependency:resolve

윈도용

 ./mvnw.cmd dependency:resolve

언급URL : https://stackoverflow.com/questions/28273543/what-are-spring-boot-starter-jars