JAVA
-
org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.toString()JAVA 2023. 6. 20. 08:47
환경 Spring Boot 2.7.12 Swagger 2.9.2 스웨거 에러 2023-06-20 08:38:11.392 ERROR [127.0.0.1] [localhost] 88594 --- [ main] o.s.boot.SpringApplication [o.s.b.SpringApplication > reportFailure:821] : Application run failed org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException: Cannot invoke "org...
-
max or limit count of 'IN' clause MysqlJAVA 2021. 4. 26. 13:45
stackoverflow.com/questions/4275640/mysql-in-condition-limit/4275704#4275704 MySQL IN condition limit Hey, I have to use IN condition in my MySQL statement with a large set of ids. Example SELECT * FROM users WHERE id IN (1,2,3,4...100000) Is there a limit if items the IN statement can have? stackoverflow.com show VARIABLES like 'max%' 16777216(Byte) = 16메가바이트(MB) 넣으려는 데이터 최대 사이즈를 확인하고 in 절에 값을 ..
-
Spring batch 히스토리 삭제JAVA 2021. 1. 4. 11:46
delete FROM BATCH_STEP_EXECUTION_CONTEXT WHERE STEP_EXECUTION_ID IN ( SELECT STEP_EXECUTION_ID FROM BATCH_STEP_EXECUTION WHERE STEP_NAME='autocompleteStep' and status='FAILED'); delete FROM BATCH_STEP_EXECUTION WHERE STEP_NAME='autocompleteStep' and status='FAILED'; delete FROM BATCH_JOB_EXECUTION_CONTEXT WHERE JOB_EXECUTION_ID in ( SELECT JOB_EXECUTION_ID FROM BATCH_JOB_EXECUTION where status='..
-
S3 파일 업로드JAVA 2020. 10. 8. 09:44
/** * s3에 접속 - 사전을 업로드 한다. * @throws IOException */ public void uploadDictionary(FileParameter parameter) throws IOException { String fileName = parameter.getDicName(); String path = makePath(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); for(String s: parameter.getKeyword()){ baos.write(s.getBytes(“UTF-8”)); baos.write(‘\n’); } byte[] fileArray = baos.toByteArray(); ObjectMetadata..
-
selectKey 여러개JAVA 2019. 2. 19. 11:48
다중 값 select 경우에 에러 발생하는 경우 -> error There is no getter for property named 'NEW_CDGRP ' in 'class java.lang.String' selectKey에서 여러 필드를 select 할 경우, resultType이 hashmap이어야한다. 그리고 keyProperty에 맞게 select되는 필드에 alias를 붙여줘야한다. (예 : AS NEW_CDGRP, as NEW_SORT) -- copyPrjGroupCode SELECT 'PJ'+ CONCAT(REPLICATE('0',4 - (LEN(MAX(SUBSTRING(NO_PRJGRP,3,LEN(NO_PRJGRP)))+1))),MAX(SUBSTRING(NO_PRJGRP,3,LEN(NO_P..
-
Back단에서 image 조정하여 InputStream으로 반환JAVA 2019. 1. 25. 09:46
1. CommonImpl.java/** * * @Auth yunsd * @Date 2019. 01. 18. * @Description * > image를 리사이징한다. */ public InputStream resizeImage (InputStream ins, int diameter) { try { String mode = System.getProperty("mode"); /*ImageIO가 'imgIO.xxxxx.tmp'파일을 생성하기 위해 tmpdir에 접근해야하므로 temp디렉터리 위치를 세팅해준다.*/ System.setProperty("java.io.tmpdir",env.getProperty(mode+".TEMP_DIR_PATH") ); BufferedImage sourceImage = Imag..
-
파일 다운로드 (excel, csv)JAVA 2018. 12. 4. 15:35
1. build.gralde// csv compile 'org.apache.commons:commons-csv:1.5' // xlsx poi compile group: 'org.apache.poi', name: 'poi-ooxml', version: '4.0.0' 2. Controller (api)import kr.co.careercare.highlight.services.exports.IExportsService; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframew..