728x90
반응형
apache commons-codec-1.11 라이브러리에서 제공하는 Base64.encodeBase64String 메서드를 사용하면 로컬환경, STS에서는 문제없이 구동이 되었으나 Gradle compileJava 시 에러가 발생
Working Directory: C:\Users\developer\git\app
Gradle user home: C:\Users\developer\.gradle
Gradle Distribution: Local installation at C:\Develop\Gradle\gradle-5.5.1
Gradle Version: 5.5.1
Java Home: C:\Develop\JDK\jdk-11.0.2
JVM Arguments: None
Program Arguments: None
Build Scans Enabled: false
Offline Mode Enabled: false
Gradle Tasks: build
> Task :compileJava
C:\Users\developer\git\app\src\main\java\kr\co\app\ServiceImpl.java:84: error: cannot find symbol
String encAuth = Base64.encodeBase64String(auth.getBytes());
^
symbol: method encodeBase64String(byte[])
location: class Base64
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 31s
1 actionable task: 1 executed
Gradle의 문제인줄 알았으나 Base64.encodeBase64 메서드로 변경하니 문제없이 Gradle compileJava 가 수행된다.
commons-codec 라이브러리의 Base64.encodeBase64String 메서드는 사용하지 않는 것이 좋을듯하다.
728x90
반응형
'개발 > Java' 카테고리의 다른 글
[SQLServer] 최신 JDBC(10.2.0) 사용시 SSL(Secure Sockets Layer) 암호화 에러발생 (2) | 2022.02.24 |
---|---|
SpringBoot 시작시 com.mysql.jdbc.Driver. This is deprecated 경고메세지 발생 (0) | 2022.02.10 |
Apache Log4j 취약점 발견(CVE-2021-44228) (0) | 2021.12.16 |
윈도우 cmd로 자바프로그램 실행시 경고메세지 발생-Unable to get Charset 'cp65001' for property 'sun.stdout.encoding' (0) | 2021.08.23 |
Maven을 이용한 JAVA 프로젝트 생성하기(Eclipse/STS) (0) | 2021.03.21 |