java -jar gameServer-0.0.1-SNAPSHOT.jar
실행
Exception in thread "main" java.lang.UnsupportedClassVersionError:
has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
->
55.0 : Java 11
내 컴퓨터에 깔려있는 자바는 Java 8 ...
www.oracle.com/kr/java/technologies/javase-jdk11-downloads.html
https://www.oracle.com/kr/java/technologies/javase-jdk11-downloads.html
가서 인스톨러로 설치
#Docker용 maven build?
run as - maven build에서 Goals에 spring-boot:build-image 넣고 실행
오류 2개 발생
The requested profile "pom.xml" could not be activated because it does not exist.
SLF4J: Class path contains multiple SLF4J bindings.
1. The requested profile "pom.xml" could not be activated because it does not exist.
-> pom.xml을 run configuration에서 삭제하고 해보라는 글이 있어서 했는데 여전히 안된다..
2. SLF4J: Class path contains multiple SLF4J bindings.
->pom.xml 에서 dependency에서 중복되는 부분을 exclude하란 이야기도 있다. 안된다.
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency>
그냥 공홈을 참고하기로 했다. .
Multiple bindings were found on the class path
SLF4J API is designed to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings.
When multiple bindings are available on the class path, select one and only one binding you wish to use, and remove the other bindings. For example, if you have both slf4j-simple-${version}.jar and slf4j-nop-${version}.jar on the class path and you wish to use the nop (no-operation) binding, then remove slf4j-simple-${version}.jar from the class path.
The list of locations that SLF4J provides in this warning usually provides sufficient information to identify the dependency transitively pulling in an unwanted SLF4J binding into your project. In your project's pom.xml file, exclude this SLF4J binding when declaring the unscrupulous dependency. For example, cassandra-all version 0.8.1 declares both log4j and slf4j-log4j12 as compile-time dependencies. Thus, when you include cassandra-all as a dependency in your project, the cassandra-all declaration will cause both slf4j-log4j12.jar and log4j.jar to be pulled in as dependencies. In case you do not wish to use log4j as the the SLF4J backend, you can instruct Maven to exclude these two artifacts as shown next:
<dependencies>
<dependency>
<groupId> org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>0.8.1</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
공홈도 안된다 ㅎ
'DEV > SpringFramework' 카테고리의 다른 글
private method Test (0) | 2022.07.05 |
---|---|
Lombok 어노테이션 (0) | 2022.06.20 |
[Spring] application. properties 변수 맵핑 (0) | 2021.09.12 |
[Spring] Server 구축 [1] (0) | 2021.09.09 |