Spring 33

POI monitorjbl xlsx-streamer ๋ฉ”๋ชจ๋ฆฌ ์ด์Šˆ ํ•ด๊ฒฐ

POI SAX ๋ณด๋‹ค ๋” ๊ฐ„๋‹จํ•˜๊ฒŒ ๋ฉ”๋ชจ๋ฆฌ ์ด์Šˆ๋ฅผ ํ•ด๊ฒฐํ• ์ˆ˜์žˆ๋Š” ๋ฐฉ๋ฒ• * ์•„๋ž˜์˜ monitorjbl api๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์—‘์…€ ๋Œ€์šฉ๋Ÿ‰ ๋ฌธ์ œ๊ฐ€ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ•ด๊ฒฐ๋œ๋‹ค.  POI SAX XSSFReader ๋Œ€์šฉ๋Ÿ‰ ์—‘์…€ ํŒŒ์ผ ์ฝ๊ธฐ OOME(Out of Memory Error) ๋ฐฉ์ง€* ์ผ๋‹จ ์‹œ์ž‘ ์ „์— ๋Œ€์šฉ๋Ÿ‰ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•œ  eclipse Heap ์˜์—ญ ๋Š˜๋ฆฌ๊ธฐeclipse .ini ํŒŒ์ผ์„ ์—ด๊ธฐ Xms (์‹œ์ž‘ํฌ๊ธฐ) / Xmx (์ตœ๋Œ€ํฌ๊ธฐ) ์ˆ˜์ •ํ•˜๊ธฐ ์ฐธ๊ณ ๋กœ Xmx ์ตœ๋Œ€ํฌ๊ธฐ๋Š” ์ž๊ธฐ์˜ pc ram ์‚ฌ์–‘์„ ํ™•์ธํ•˜๊ณ  ๋ฐ”๊พธ๊ธฐ ์ถ”์ฒœtruecode-95.tistory.com  1. poi๋ฒ„์ „์— ๋งž๋Š” monitorjbl .jar๋ฅผ ๋‹ค์šด๋ฐ›๊ธฐ. Download xlsx-streamer.jar - @com.monitorjblDownload: xlsx-..

Spring 2024.06.07

POI SAX XSSFReader ๋Œ€์šฉ๋Ÿ‰ ์—‘์…€ ํŒŒ์ผ ์ฝ๊ธฐ OOME(Out of Memory Error) ๋ฐฉ์ง€

* ์ผ๋‹จ ์‹œ์ž‘ ์ „์— ๋Œ€์šฉ๋Ÿ‰ ํ…Œ์ŠคํŠธ๋ฅผ ์œ„ํ•œ  eclipse Heap ์˜์—ญ ๋Š˜๋ฆฌ๊ธฐeclipse .ini ํŒŒ์ผ์„ ์—ด๊ธฐ Xms (์‹œ์ž‘ํฌ๊ธฐ) / Xmx (์ตœ๋Œ€ํฌ๊ธฐ) ์ˆ˜์ •ํ•˜๊ธฐ ์ฐธ๊ณ ๋กœ Xmx ์ตœ๋Œ€ํฌ๊ธฐ๋Š” ์ž๊ธฐ์˜ pc ram ์‚ฌ์–‘์„ ํ™•์ธํ•˜๊ณ  ๋ฐ”๊พธ๊ธฐ ์ถ”์ฒœ  JVM ๋ฉ”๋ชจ๋ฆฌ ์ฒดํฌํ•˜๋Š” ๋ฐฉ๋ฒ• // ์—‘์…€ ํŒŒ์ผ ์ฒ˜๋ฆฌ ์ „์˜ ๋ฉ”๋ชจ๋ฆฌ ์ƒํƒœ ์ถœ๋ ฅRuntime runtime = Runtime.getRuntime();long memoryBefore = runtime.totalMemory() - runtime.freeMemory();totalMemory(): JVM์ด ํ• ๋‹นํ•œ ์ „์ฒด ๋ฉ”๋ชจ๋ฆฌ ์–‘์„ ๋ฐ˜ํ™˜. JVM์˜ ์ดˆ๊ธฐ ๋ฉ”๋ชจ๋ฆฌ ํฌ๊ธฐ์™€ ์ตœ๋Œ€ ๋ฉ”๋ชจ๋ฆฌ ํฌ๊ธฐ๋ฅผ ํ•ฉ์นœ ๊ฐ’ freeMemory(): ํ˜„์žฌ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๋ฉ”๋ชจ๋ฆฌ ์–‘์„ ๋ฐ˜ํ™˜. ํ˜„์žฌ ํ• ๋‹น๋œ ๋ฉ”๋ชจ๋ฆฌ ์ค‘์—์„œ..

Spring 2024.05.23

[SUMMERNOTE] ์ธ๋จธ๋…ธํŠธ ์ด๋ฏธ์ง€ ๋‹ค์ค‘ ์—…๋กœ๋“œ ์ฒ˜๋ฆฌ (๊ธ€ ์ €์žฅ ํด๋ฆญ ์‹œ ์ž„์‹œํด๋”์— ์žˆ๋˜ ํŒŒ์ผ ๋ณต์‚ฌํ•˜์—ฌ ์™ธ๋ถ€ ํด๋”์—..)

[JAVA, SPRING, SUMMERNOTE] ์„œ๋จธ๋…ธํŠธ ์‚ฌ์šฉ๋ฒ• โ‘ข (๋‹ค์ค‘ ์ด๋ฏธ์ง€ ์—…๋กœ๋“œ) ์„œ๋จธ๋…ธํŠธ ํˆด๋ฐ”์„ค์ • : tyrannocoding.tistory.com/14 [JAVA, SPRING, SUMMERNOTE] ์„œ๋จธ๋…ธํŠธ ์‚ฌ์šฉ๋ฒ• โ‘ก (Toolbar ์ˆ˜์ •) ์„œ๋จธ๋…ธํŠธ ์—ฐ๋™ : tyrannocoding.tistory.com/13 [JAVA, SPRING, SUMMERNOTE] ์„œ๋จธ๋…ธํŠธ ์‚ฌ์šฉ๋ฒ•.. tyrannocoding.tistory.com Summernote - Super Simple WYSIWYG editor Super Simple WYSIWYG Editor on Bootstrap Summernote is a JavaScript library that helps you create WYSIWYG edito..

Spring 2022.02.24

@RequestParam ๊ฐ’์ด Null / ์˜ˆ์™ธ ์ฒ˜๋ฆฌ (required=false)

@RequestParam spring MVC์—์„œ ์ฟผ๋ฆฌ ์ŠคํŠธ๋ง ์ •๋ณด๋ฅผ ์‰ฝ๊ฒŒ ๊ฐ€์ ธ์˜ค๋Š” ๋ฐ ์‚ฌ์šฉ @RequestParam(required=false)๋ฅผ ์ ์šฉํ•ด ํŠน์ • ํŒŒ๋ผ๋ฏธํ„ฐ ๊ฐ’๋งŒ ๋ฐ›์„ ์ˆ˜ ์žˆ๋‹ค. intํ˜• ์ผ ๊ฒฝ์šฐ (defaultValue="0") (required=false)๋กœ ์ง€์ •ํ•˜๋ฉด ํ•ด๋‹น ํ‚ค๊ฐ’์ด ์กด์žฌํ•˜์ง€ ์•Š๋‹ค๊ณ  ํ•ด์„œ BadRequest๊ฐ€ ๋ฐœ์ƒํ•˜์ง€ ์•Š๋Š”๋‹ค. required ์†์„ฑ ๊ฐ’์„ ๋”ฐ๋กœ ์ž‘์„ฑ์•ˆํ•  ๊ฒฝ์šฐ ๊ธฐ๋ณธ ๊ฐ’์€ true๋กœ ์ง€์ • * ์กด์žฌํ•˜์ง€ ์•Š๋‹ค๋ฉด folder ๋ณ€์ˆ˜์— default๋กœ null ํ• ๋‹น @RequestMapping(value="/common/getImg.do" , method=RequestMethod.GET) public void getImg(@RequestParam(value="id") Stri..

Spring 2022.02.16

[Spring] WebSocket sockJS ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (3)

[Spring] WebSocket sockJS Q&A ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (1) WebSocket : ์›น์†Œ์ผ“์—์„œ๋Š” ์„œ๋ฒ„์™€ ๋ธŒ๋ผ์šฐ์ € ์‚ฌ์ด์— ์–‘๋ฐฉํ–ฅ ์†Œํ†ต์ด ๊ฐ€๋Šฅ ์›น ์†Œ์ผ“์€ HTML5 ์ดํ›„์— ๋‚˜์™”๊ธฐ ๋•Œ๋ฌธ์— Socket.io์™€ SockJS ์ด์šฉํ•ด์„œ HTML5 ์ด์ „ ๊ธฐ์ˆ ๋กœ ๊ตฌํ˜„๋œ ์„œ๋น„์Šค์—์„œ๋„ ์›น ์†Œ์ผ“์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•  ์ˆ˜ truecode-95.tistory.com [Spring] WebSocket sockJS Q&A ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (2) [ ๊ฐœ๋ฐœ ๋ถ€๋ถ„ ] WebSocketHandler.java package egovframework...; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.la..

Spring 2022.01.10

[Spring] ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ ๊ตฌํ˜„

[AJAX] ๋‹ค์ค‘ fileupload / formData ์ด์šฉํ•˜์—ฌ JSON ํŒŒ๋ผ๋ฏธํ„ฐ ๋„˜๊ธฐ๊ธฐ html js file์€ JSON์— ํฌํ•จ๋  ์ˆ˜ ์—†๋‹ค. ๊ทธ๋ž˜์„œ FormData ์•ˆ์— file๊ณผ JSON (= data)๋ฅผ append ์‹œํ‚จ๋‹ค. //FormData ์ƒˆ๋กœ์šด ๊ฐ์ฒด ์ƒ์„ฑ var formData = new FormData(); // ๋„˜๊ธธ ๋ฐ์ดํ„ฐ๋ฅผ ๋‹ด์•„์ค€๋‹ค. var data =.. truecode-95.tistory.com ์—…๋กœ๋“œ ์ดํ›„๋กœ ๋‹ค์šด๋กœ๋“œ ๊ธฐ๋Šฅ์„ ์ •๋ฆฌํ•ด๋ณด์•˜๋‹ค. xml SELECT file_no, board_no, original_file_name, stored_file_name, file_size, create_date, create_user, del_y_n FROM commonfiles WHERE b..

Spring 2021.12.15

์ปจํŠธ๋กค๋Ÿฌ ์•„๋‹Œ๊ณณ์—์„œ session ๊ฐ’ ์–ป๊ธฐ

public static LoginVO getUser(){ ServletRequestAttributes servletrequestattributes = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes(); HttpSession session = servletrequestattributes.getRequest().getSession(true); return (LoginVO) session.getAttribute("์ปจํŠธ๋กค๋Ÿฌ์—์„œ ๋งŒ๋“ค์—ˆ๋˜ setAttribute ๊ฐ’ ex)loginVO"); } ์ฐธ๊ณ  : https://devmg.tistory.com/63

Spring 2021.11.28

[Spring] WebSocket sockJS Q&A ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (2)

[Spring] WebSocket sockJS Q&A ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (1) WebSocket : ์›น์†Œ์ผ“์—์„œ๋Š” ์„œ๋ฒ„์™€ ๋ธŒ๋ผ์šฐ์ € ์‚ฌ์ด์— ์–‘๋ฐฉํ–ฅ ์†Œํ†ต์ด ๊ฐ€๋Šฅ ์›น ์†Œ์ผ“์€ HTML5 ์ดํ›„์— ๋‚˜์™”๊ธฐ ๋•Œ๋ฌธ์— Socket.io์™€ SockJS ์ด์šฉํ•ด์„œ HTML5 ์ด์ „ ๊ธฐ์ˆ ๋กœ ๊ตฌํ˜„๋œ ์„œ๋น„์Šค์—์„œ๋„ ์›น ์†Œ์ผ“์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•  ์ˆ˜ truecode-95.tistory.com [ ๊ฐœ๋ฐœ ๋ถ€๋ถ„ ] WebSocketHandler.java package egovframework...; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.sess..

Spring 2021.11.12

[Spring] WebSocket sockJS Q&A ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ ๊ตฌํ˜„ํ•˜๊ธฐ (1)

WebSocket : ์›น์†Œ์ผ“์—์„œ๋Š” ์„œ๋ฒ„์™€ ๋ธŒ๋ผ์šฐ์ € ์‚ฌ์ด์— ์–‘๋ฐฉํ–ฅ ์†Œํ†ต์ด ๊ฐ€๋Šฅ ์›น ์†Œ์ผ“์€ HTML5 ์ดํ›„์— ๋‚˜์™”๊ธฐ ๋•Œ๋ฌธ์— Socket.io์™€ SockJS ์ด์šฉํ•ด์„œ HTML5 ์ด์ „ ๊ธฐ์ˆ ๋กœ ๊ตฌํ˜„๋œ ์„œ๋น„์Šค์—์„œ๋„ ์›น ์†Œ์ผ“์ฒ˜๋Ÿผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ํด๋ผ์ด์–ธํŠธ์ชฝ์€SockJS client๋ฅผ ํ†ตํ•ด ์„œ๋ฒ„์™€ ํ†ต์‹ ํ•œ๋‹ค. ๊ทธ๋ž˜์„œ javaScript์—์„œ sockJS ์ด์šฉํ•˜์—ฌ ์‹ค์‹œ๊ฐ„ ์•Œ๋ฆผ์„ ๊ตฌํ˜„ํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค. [ ์„ธํŒ… ๋ถ€๋ถ„ ] pom.xml (= Maven ์„ค์ •) https://mvnrepository.com/artifact/org.springframework/spring-websocket org.springframework spring-websocket ${spring.maven.artifact.version} javax.webso..

Spring 2021.11.11