본문 바로가기

전체 글174

spring3 legacy 0. eclipse 에서 maven project 생성 1. pom.xml 4.0.0 com.example SpringCxfTest 0.0.1-SNAPSHOT war SpringCxfTest Maven Webapp http://www.example.com UTF-8 1.7 1.7 3.2.8.RELEASE org.springframework spring-webmvc ${spring.framework.version} SpringCxfTest maven-clean-plugin 3.1.0 maven-resources-plugin 3.0.2 maven-compiler-plugin 3.8.0 maven-surefire-plugin 2.22.1 maven-war-plugin 3.2.2 maven-install-plu.. 2023. 1. 30.
babel, change ternary to If-else statements var babel = require("@babel/core"); // 삼항연산자를 if문으로 수정 var ternaryTemplate = babel.template(` (function() { if (TEST) { return CONSEQUENT; } return ALTERNATE; })(); `); var custom1 = function ({ types: t }) { return { visitor: { ConditionalExpression(path) { try { path.replaceWith( ternaryTemplate({ TEST: path.node.test, CONSEQUENT: path.node.consequent, ALTERNATE: path.node.alternate, }) ); } c.. 2022. 11. 29.
babel, add curly braces in arrow function var babel = require("@babel/core"); var custom1 = function ({ types: t }) { return { visitor: { ArrowFunctionExpression(path) { try { if (path.node.body.type !== 'BlockStatement') { var argument = path.node.body; var body = t.returnStatement(argument); var body2 = t.blockStatement([body]); path.replaceWith( // replace를 하면 다시 ArrowFunctionExpression 이벤트 발생. t.arrowFunctionExpression(path.node.par.. 2022. 11. 29.
babel, add curly braces one-line if-statements var babel = require("@babel/core"); // if문에 add curly-brace (one line) var custom1 = function ({ types: t }) { return { visitor: { // if, else if IfStatement(path) { if (path.node.consequent.type !== 'BlockStatement') { var consequent = t.blockStatement([path.node.consequent]); path.replaceWith( t.ifStatement(path.node.test, consequent, path.node.alternate) ); } }, // else ExpressionStatement(pa.. 2022. 11. 29.
babel, remove comments var babel = require("@babel/core"); var sourceCode = ` var name = 'ysh'; /* comment1 */ /** * comment2 */ // comment 3 var dept = 'dev'; `; // 주석 제거 var parsedAst = babel.parseSync(sourceCode, { parserOpts: { attachComment: false }, }); sourceCode = babel.transformFromAstSync(parsedAst, sourceCode, { }).code; console.log(sourceCode); // 결과 // var name = 'ysh'; // var dept = 'dev'; 2022. 11. 29.
브라우저 탭 2개 스크롤 동기화 (웨일, 크롬 브라우저) 웨일 브라우저는 듀얼탭을 지원하지만 탭 2개의 스크롤 동기화는 지원하지 않는다. 사람들이 질문은 하던데... https://forum.whale.naver.com/topic/38190/ 듀얼탭 동시 스크롤 기능 추가해주세요! 데스크탑에서 듀얼탭 사용시 동시 스크롤 기능이 있었으면 좋겠습니다. 이 의견을 내게된 이유는 번역기능을 사용하여 영문 사이트를 볼때 번역부분이 자연스럽지 않는 부분도 있어서 번역 하 forum.whale.naver.com https://forum.whale.naver.com/topic/46008/?tab=comments#comment-109077 듀얼탭 스크롤 듀얼탭에서 두 페이지 사이에 마우스커서 올려서 - 커서일때 마우스휠 위아래 동작에 두 페이지가 동시에 스크롤 되었으면 합니다.. 2022. 10. 6.
log4j2, jersey, jdk1.8 log4j2 보안 이슈 때문에 jdk1.8 시스템에 log4j 1.x -> log4j 2.17.0 으로 변경하는 작업중 java.lang.ArrayIndexOutOfBoundsException 에러 발생. 보통 java.lang.ArrayIndexOutOfBoundsException 이슈는 고정된 배열의 크기를 넘어가면 발생하는데, 또다른 상황에서도 발생한다. 람다. lambda. lambda가 포함된 class를 읽고, 파싱할 때, lambda를 지원하지 않는 라이브러리에서도 동일한 에러가 발생한다. class 파일이 클래스로더 등에서 읽힐 때, byte[] 배열로 취급되기 때문에 배열 관련된 java.lang.ArrayIndexOutOfBoundsException 에러가 발생한 걸까? 더 깊게는 안봄.. 2021. 12. 30.
eclipse 기본 세팅 eclipse.ini -Xms256m -Xmx2048m theme 설정 (File > Import > Preferences) http://www.eclipsecolorthemes.org/ http://www.eclipsecolorthemes.org/?view=theme&id=30 window > preferences jre, server 설정 workspace 설정(utf-8) startup and shutdown 해제 show heap status show print margin 해제 java folding 해제 Auto Activation 해제 validation 해제 spelling 해제 Project > Properties Builders 확인 기타 자동정렬시 maximun line width *.. 2021. 11. 15.