Extract code to a variable

Ctrl + Alt + V

 

해당 코드에서 코드에맞는 데이터 변수 타입 , 변수 명 자동 생성

 

request.getContextPath();

입력 후 Ctrl + Alt + V

변수타입 + 추천 변수명리스트 자동 생성

'Java.Spring' 카테고리의 다른 글

[IntelliJ] HTML 인식안됨  (0) 2023.01.16
SpringBoot 3.0 Error - 3.0 부터 바뀐내용  (0) 2023.01.13
Multiple annotations found at this line error  (0) 2022.12.28

1. HTML 파일 패턴에서 html이 없는경우

2.File type auto-detected by file content 에 해당 파일이 추가 된 경우

File -> Settings -> File Types

 

A problem occurred configuring root project 'demo'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1.
     Required by:
         project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1
      > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.6' but:
          - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
          - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8)
                  - 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')
          - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
          - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
          - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '7.6')
          - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 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 8)
                  - 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')

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

spring Boot 3.0 version 환경에서 프로젝트를 생성하는데 계속 오류가 생겼다

dependency 도 바꿔보고 없애도 봤는데 해결되지 않았다.

그래서 JAVA version 문제인가 ? 했더니 맞았다.

 

Spring Boot 3.0 부터 달라진점

최소 자바 버전 8 -> 17 변경

등등 이런내용들 ,, 자세한 내용은

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Release-Notes

 

GitHub - spring-projects/spring-boot: Spring Boot

Spring Boot. Contribute to spring-projects/spring-boot development by creating an account on GitHub.

github.com

공식 github에서 확인할 수 있다.

'Java.Spring' 카테고리의 다른 글

[IntelliJ] Extract code to a variable  (0) 2023.01.16
[IntelliJ] HTML 인식안됨  (0) 2023.01.16
Multiple annotations found at this line error  (0) 2022.12.28

Eclipse Dynamic Web

JSP 파일에서 마주친 Multiple annotations found at this line ERROR이다.

 

라이브러리 경로를 잡아주면 된다.

프로젝트 우클릭 -> properties -> Libraries

Server Runtime을 추가해 준다

만약 Server Runtime을 추가해줘도 오류가 안없어진다면

Web App Libraries를 추가해주고 apply 를 눌러준다

 

에러가 없어졌다 !

'Java.Spring' 카테고리의 다른 글

[IntelliJ] Extract code to a variable  (0) 2023.01.16
[IntelliJ] HTML 인식안됨  (0) 2023.01.16
SpringBoot 3.0 Error - 3.0 부터 바뀐내용  (0) 2023.01.13

+ Recent posts