Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Git
- 인터럽트
- 커널 동기화
- 프로세스 주소 공간
- 갤럭시 S24
- CPU 스케줄링
- 반효경
- 쉬운 코드
- 트랜잭션
- 네트워크
- SQL
- concurrency control
- Extendable hashing
- 데이터베이스
- 운영체제와 정보기술의 원리
- 개발남노씨
- SDK
- recoverability
- 코딩애플
- B tree 데이터삽입
- 백엔드
- 쉬운코드
- 온디바이스AI
- 시그널 핸들러
- 코딩테스트 [ ALL IN ONE ]
- 김영한
- vite
- 운영체제
- BreadcrumbsComputer-Networking_A-Top-Down-Approach
- 시스템프로그래밍
Archives
- Today
- Total
티끌모아 태산
Spring Boot 본문
728x90
스프링 부트란
보통 스프링부트 프로젝트를 만들 때, 위 사이트에서 설정을 하고 다운받아 IDE에서 Open을 통해 실행하게 된다. 스프링부트란 자바 웹 프로그램을 더욱 쉽고 빠르게 만들기 위한 도구이다. 새로운 기술이라기 보다는 스프링 프레임워크를 개선한 것이다.
- 개발 환경 설정 간소화: 외부라이브러리를 최적화해 제공하기 때문에 사용자가 직접 연동할 필요가 없다. (스프링은 버전에 따라 동작하는 외부 라이브러리를 일일 찾아 연동해야 한다.)
- 웹 애플리케이션 서버 내장: 스프링 부트는 웹 애플리케이션 서버(WAS: Web Application Server)인 톰캣을 가지고 있다. 따라서 웹 서비스를 jar 파일로 간편하게 배포할 수 있다.
스프링 부트 개발 환경 설정
- JDK(Java Development Kit, 자바 개발 도구) 설치하기
- IDE(이클립스 or 인텔리제이) 설치하기. IDE는 개발 생산성을 높여주는 도구 역할
- 스프링 부트 프로젝트 만들기 (스프링 부트 3 버전은 JDK 17이상만 지원한다.)
- H2 Database: 자료를 저장하기 위한 데이터베이스
- Mustache: 화면을 만들기 위해 필요한 도구
- Spring Data JPA: 데이터베이스를 좀 더 편리하게 다루게 해주는 도구
트러블 슈팅
A problem occurred configuring root project 'toy'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.3.0.
Required by:
project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.3.0
> No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.3.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.7' but:
- Variant 'apiElements' declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')
- Variant 'javadocElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')
- Variant 'mavenOptionalApiElements' declares a library, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')
- Variant 'mavenOptionalRuntimeElements' declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')
- Variant 'modernGradleRuntimeElements' declares a library for use during runtime, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.7':
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Variant 'runtimeElements' declares a library for use during runtime, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5':
- Incompatible because this component declares a component, compatible with Java 17 and the consumer needed a component, compatible with Java 11
- Variant 'sourcesElements' declares a component for use during runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them packaged as a jar)
- Doesn't say anything about its target Java version (required compatibility with Java 11)
- Doesn't say anything about org.gradle.plugin.api-version (required '8.7')
* Try:
> Review the variant matching algorithm at https://docs.gradle.org/8.7/userguide/variant_attributes.html#sec:abm_algorithm.
> No matching variant errors are explained in more detail at https://docs.gradle.org/8.7/userguide/variant_model.html#sub:variant-no-match.
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 99ms
스프링 부트 프로젝트를 다운받아 빌드하는 과정에서 오류가 발생했다.
오류 원인
스프링 부트 버전 3이상부터는 JDK가 17이상이어야 한다. 처음 인텔리제이스에는 아래와 같이 버전이 잘못 초기화 되어있는 것을 확인할 수 있다.
해결 방안
이와 같이 Grade JVM을 수정한 후 빌드를 실행하면 성공적으로 빌드가 됨을 확인할 수 있다.
728x90
'백엔드 > 스프링' 카테고리의 다른 글
1. 객체 지향 설계와 스프링 (0) | 2024.05.27 |
---|