스프링 부트 기반의 스프링 프로젝트를 만들어주는 사이트
https://start.spring.io/
maven / gradle 선택 (최근에는 gradle 사용)
SpringBoot 버전 선택
정식 릴리즈 된 버전 선택하기
metadata : 프로젝트 명
artifact : 빌드할때 나오는 이름
dependencies 선택 (사용할 라이브러리 선택)
web프로젝트를 만들 것 이기 때문에
Spring Web, html 템플릿 엔진 선택
인텔리제이에서 프로젝트 import하기
디펜던시 라이브러리 다운로드 --> mavenCentral()
gradle 통해서 run 할 경우 느릴 수 있기 때문에
설정을 바꿔준다.
setting -> gradle 검색 -> 두가지 항목 intelliJ로 변경
강의에서 본대로 프로젝트 생성하고 켰는데 어찌된 이유인지 빨간불만 잔뜩이어따 ㅠ 그래서 희라센세에게 헲 쳤움
A problem occurred configuring root project 'hello-spring'. Could not resolve all files for configuration ':classpath'. Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.5. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.5 No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.5 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6.1' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 declares a runtime of a component, 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 target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.5 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.5 declares a runtime of a library, 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 '7.6.1') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 declares a runtime of a library, 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 '7.6.1') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.5 declares a runtime of a component, 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 target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.6.1') * Try: 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.
부트버전이 3번대로 넘어가면 17이 되어버려서 2.9.7 버전을 써야한다,,!