๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๋ฐ˜์‘ํ˜•

๊ฐœ๋ฐœ93

[Maven] ๋ฉ”์ด๋ธ repository์— ์—†๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€ํ•˜๊ธฐ ํ•„์š”ํ•œ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ build.gradle์ด๋‚˜ pom.xml์˜ dependency์— ๋ช…์‹œ์— ์ฃผ๊ธฐ๋งŒ ํ•˜๋ฉด maven repository์—์„œ ์•Œ์•„์„œ ๊ฐ€์ ธ์™€์ค€๋‹ค. ํ•˜์ง€๋งŒ ํšŒ์‚ฌ์˜ ๋‚ด๋ถ€๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์™€ ๊ฐ™์€ maven repository์— ์—†๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์žˆ๋‹ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ• ๊นŒ? ๋ฐฉ๋ฒ•1 pom.xml์— ๋จผ์ € ๋ช…์‹œํ–ˆ์„ ๊ฒฝ์šฐ maven repository์— ํ•ด๋‹น ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์กด์žฌํ•˜์ง€ ์•Š์•„ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. ๋กœ์ปฌ์˜ maven repository ์— ๊ฐ€๋ณด๋ฉด ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ์ƒ์„ฑ๋˜์–ด ์žˆ๋‹ค. ์—ฌ๊ธฐ์— test-1.0.0.jar ํŒŒ์ผ์„ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด pom.xml์˜ ์—๋Ÿฌ๊ฐ€ ์‚ฌ๋ผ์ง„๋‹ค. ๋ฐฉ๋ฒ•2 mvn install:install-file -Dfile=D:\test-1.0.0.jar -DgroupId=com.test.ynzu -Dartifact.. 2022. 2. 3.
[JAVA] ๋Œ€์นญํ‚ค ์•”ํ˜ธํ™” ์•Œ๊ณ ๋ฆฌ์ฆ˜ ํ‚ค ์ œํ•œ ์˜ค๋ฅ˜ ํ•ด๊ฒฐ : Illegal key size ๊ฐœ๋ฐœ ์ค‘ ๋Œ€์นญํ‚ค๋กœ ์•”ํ˜ธํ™”ํ•ด์•ผํ•  ์ƒํ™ฉ์ด ์ƒ๊ฒผ๋Š”๋ฐ(DESede/CBC, DES/CBC, AES/CBC ๋“ฑ์˜ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ์ด์šฉ), 192 ํ˜น์€ 256 bit์˜ ๋Œ€์นญํ‚ค๋ฅผ ์ด์šฉํ•˜์—ฌ ์•”ํ˜ธํ™”๋ฅผ ํ•  ๊ฒฝ์šฐ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋‹ค. java.security.InvalidKeyException: Illegal key size ์›์ธ์„ ์ฐพ์•„๋ณด๋‹ˆ Java๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ JCE ์ •์ฑ…์„ ์ œ๊ณตํ•˜๋Š”๋ฐ ์ด ์ •์ฑ…์€ ๋ฏธ๊ตญ์˜ ์ •์ฑ…์— ๋”ฐ๋ผ 128 bit๋กœ ํ‚ค ๊ธธ์ด๊ฐ€ ์ œํ•œ๋˜์–ด ์žˆ์–ด์„œ ์ด๋ฅผ ์ดˆ๊ณผํ•˜๋Š” ๊ฒฝ์šฐ์—” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜๋Š” ๊ฒƒ ์ด๋‹ค. ์ด ์ •์ฑ…์€ /jre/lib/security/local_policy.jar์˜ default_local.policy ํŒŒ์ผ์—์„œ ํ™•์ธํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ •์ฑ… ๋‚ด์šฉ์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค. // Some countries have import limit.. 2022. 1. 26.
[JAVA] class file for javax.interceptor.InterceptorBinding not found SBA(Spring Boot Admin)์„ ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ ์ž ํ•˜๋Š” ํ”„๋กœ์ ํŠธ์— 'spring-boot-admin-starter-client' ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์ถ”๊ฐ€ ํ–ˆ๋‹ค. java: cannot access javax.interceptor.InterceptorBinding class file for javax.interceptor.InterceptorBinding not found Consult the following stack trace for details. com.sun.tools.javac.code.Symbol$CompletionFailure: class file for javax.interceptor.InterceptorBinding not found ๊ทธ ์ „์— build๊ฐ€ ์ž˜ ๋๋Š”๋ฐ ๊ฐ‘์ž๊ธฐ.. 2022. 1. 26.
[Spring] Spring Boot Admin ์‚ฌ์šฉํ•˜๊ธฐ - Log, Login ์ ์šฉ 1. ๊ธฐ๋ณธ ์„ธํŒ… 1.1 Admin Server maven ํ˜น์€ gradle์— spring-boot-admin-starter-server ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€ de.codecentric spring-boot-admin-starter-server 2.6.2 // https://mvnrepository.com/artifact/de.codecentric/spring-boot-admin-starter-server implementation 'de.codecentric:spring-boot-admin-starter-server:2.6.2' @EnableAdminServer ์ถ”๊ฐ€ @SpringBootApplication @EnableAdminServer public class AdminApplication { public.. 2022. 1. 25.
[JavaScript] var, let, const ๋น„๊ต - var is used instead of let or const ์ธํ…”๋ฆฌ์ œ์ด๋ฅผ ์ž‘๋…„์— ์ฒ˜์Œ ์‚ฌ์šฉํ•ด๋ดค๋Š”๋ฐ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ๋ฅผ ๊ฐœ๋ฐœํ•  ๋•Œ ํ‰์†Œ์ฒ˜๋Ÿผ var์„ ์‚ฌ์šฉํ–ˆ๋”๋‹ˆ'var is used instead of let or const' ๋ผ๋Š” ๋ฉ”์‹œ์ง€๊ฐ€ ๋ณด์—ฌ์กŒ๋‹ค. ๋ฉ”์‹œ์ง€๋ฅผ ๋ฒˆ์—ญํ•ด๋ณด๋ฉด 'var'๋Œ€์‹  'let'์ด๋‚˜ 'const'๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๋Š” ๊ฒƒ์ด๋‹ค. sts๋ฅผ ์‚ฌ์šฉํ•  ๋• ์ €๋Ÿฐ ๋ฉ”์‹œ์ง€๊ฐ€ ๋‚˜์˜ค์ง€ ์•Š์•˜๋Š”๋ฐ ์™œ 'var'๋Œ€์‹  'let'์ด๋‚˜ 'const'๋ฅผ ์‚ฌ์šฉํ•˜๋ผ๋Š”๊ฑด์ง€ ์„œ์น˜ํ•ด๋ณด์•˜๋‹ค! es6๋ถ€ํ„ฐ๋Š” var๋Œ€์‹  ์ƒˆ๋กœ์šด ๋ณ€์ˆ˜ ์„ ์–ธ ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋ฌผ๋ก  var์‚ฌ์šฉ์„ ๋ชปํ•˜๋Š” ๊ฑด ์•„๋‹ˆ์ง€๋งŒ ์ธํ…”๋ฆฌ์ œ์ด์—์„œ ์ƒˆ๋กœ์šด ํ‘œ์ค€์— ๋งž๊ฒŒ ๊ฐœ๋ฐœํ•˜๋ผ๋Š” ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€๋ฅผ ๋„์–ด์ฃผ๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ตœ๊ทผ์˜ ๋งŽ์€ ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๊ฐ•์ขŒ์—์„œ๋„ ๊ฐ€๊ธ‰์  var ๋Œ€์‹ ์— let์ด๋‚˜ const ํ‚ค์›Œ๋“œ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ๋ณ€์ˆ˜๋ฅผ ์„ ์–ธํ•˜๋ผ๊ณ  ๊ฐ€์ด๋“œํ•˜๊ณ  ์žˆ๋‹ค๊ณ .. 2022. 1. 24.
[JAVA] Optional ๊ฐœ๋… ๋ฐ ์‚ฌ์šฉ๋ฒ•, ์˜ˆ์ œ 1. Optional์ด๋ž€? ๊ฐœ๋ฐœ์„ ํ•˜๋‹ค ๋ณด๋ฉด NullPointException(NPE)์„ ๋งŒ๋‚˜๊ฒŒ ๋œ๋‹ค. ๊ฐ€์žฅ ๋งŽ์ด ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ ์ค‘ ํ•˜๋‚˜๋ผ๊ณ  ํ•˜๋Š”๋ฐ, ์ด๋ฅผ ํ”ผํ•˜๊ธฐ ์œ„ํ•ด์„  null์„ ์ฒดํฌํ•˜๋Š” ๋กœ์ง์ด ์ถ”๊ฐ€๋˜์–ด์•ผ ํ•œ๋‹ค. DeviceVo deviceVo = deviceDao.findById(deviceId); //id์— ํ•ด๋‹นํ•˜๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ์—†๋‹ค๋ฉด deviceVo๋Š” null์ด๋‹ค. deviceVo.getName(); //deviceVo๋Š” null์ด๊ธฐ ๋•Œ๋ฌธ์— NullPointException์ด ๋ฐœ์ƒํ•œ๋‹ค. deviceVo.getModel().getModelId(); //deviceVo๊ฐ€ null์ด ์•„๋‹ˆ๋”๋ผ๋„ Model์ด null์ด๋ฉด NullPointException์ด ๋ฐœ์ƒํ•œ๋‹ค. if(deviceVo != null){ d.. 2022. 1. 21.
[Intellij] finished with non-zero exit value 1 ์—๋Ÿฌ Execution failed for task ':TestApplication.main()'. > Process 'command 'C:/Program Files/Java/jdk-9.0.4/bin/java.exe'' finished with non-zero exit value 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. 1. File > Settings ( ๋‹จ์ถ•ํ‚ค : Ctrl + Alt + S ) 2. Build, Execution, Deployment > Build To.. 2022. 1. 20.
[Web] XFF - Load balancers ํ˜น์€ Proxy ํ™˜๊ฒฝ์—์„œ Client IP ๊ฐ€์ ธ์˜ค๊ธฐ ๊ธฐ์กด์—๋Š” request.getRemoteAddr(); ๋ฅผ ํ†ตํ•ด Client์˜ IP๋ฅผ ๊ฐ€์ ธ์™”๋Š”๋ฐ ์›น์„œ๋ฒ„๋‚˜ WAS ์•ž์— L4์™€ ๊ฐ™์€ Load balancers๋‚˜ Proxy server, caching server๋“ฑ์ด ์žˆ๋Š” ๊ฒฝ์šฐ๋Š” ์›ํ•˜๋Š” ๊ฒฐ๊ณผ๋ฅผ ์–ป์ง€ ๋ชปํ•˜๋Š” ๊ฒƒ์„ ๋ฐœ๊ฒฌํ•˜์˜€๋‹ค. ์ด๋Ÿฐ ์ œํ’ˆ์€ ์›น์„œ๋ฒ„ ํ˜น์€ WAS์— HTTP๋‚˜ AJP ์š”์ฒญ์„ ๋ณด๋‚ธ ํ›„ ๋ฐ›์€ ๊ฒฐ๊ณผ๋ฅผ ๊ฐ€๊ณตํ•˜์—ฌ ํด๋ผ์ด์–ธํŠธ์— ์žฌ์ „์†กํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์œ„์™€ ๊ฐ™์€ ํ˜„์ƒ์ด ๋ฐœ์ƒํ•œ ๊ฒƒ์ด๋‹ค. ( ํด๋ผ์ด์–ธํŠธ IP -> ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ, ํ”„๋ก์‹œ ์žฅ๋น„ -> ์›น์„œ๋ฒ„ ) ๊ทธ๋ž˜์„œ ๋“ฑ์žฅํ•œ ๊ฒƒ์ด XFF(X-Forwarded-For)์ด๋‹ค! XFF ์—๋Š” Client์™€ Proxy IP ๊ฐ€ ์ฝค๋งˆ๋ฅผ ๊ตฌ๋ถ„์ž๋กœ ๋“ค์–ด๊ฐ€๊ฒŒ ๋˜์–ด์žˆ๋Š”๋ฐ ์ˆœ์„œ๋Š” ์•„๋ž˜์™€ ๊ฐ™๊ธฐ ๋•Œ๋ฌธ์— ์ฒซ๋ฒˆ์งธ IP๋ฅผ ๊ฐ€์ ธ์˜ค๋ฉด Client์˜ IP๋ฅผ ํš๋“ํ• .. 2022. 1. 20.
728x90
๋ฐ˜์‘ํ˜•