전체 글 44

[JAVA] 객체 리스트(List)의 특정필드 추출하여 리스트(List) 만들기

! 기록을 위한 포스트입니다. 자바8이상에서 객체 리스트에서 특정필드에서 추출하는 코드는 다음과 같다. // 예시용 DTO @Getter @Setter class TestDto { @ApiModelProperty(position = 1, value = "테스트번호", example = "1") private Integer testNo; @ApiModelProperty(position = 1, value = "테스트내용", example = "테스트내용입니다.") private String testContent; } // TestDto의 번호만 추출하여 새로운 리스트 만들기 List testList = ...; List testNoList = testList.stream().map(TestDto::getT..

Dev/etc 2023.02.28

[Excel]microsoft.office.interop.excel.applicationclass' 오류

! 기록을 위한 포스트입니다. `microsoft.office.interop.excel.applicationclass' 형식의 com 개체를 인터페이스 형식... 이와 같은 오류가 발생하여 다음과 같은 방법으로 해결했다. 1. 윈도우 설정에서 앱 - 앱 및 기능에서 Microsoft 365를 찾아 클릭 후 수정버튼을 클릭한다. 2. Office 프로그램 복구 방법 중 빠른 복구를 선택하고 복구를 한다. 설치된 PC의 레지스트리 편집기의 다음경로에서 확인했을 때 HKEY_CLASSES_ROOT\TypeLib\{000208D5-0000-0000-C000-000000000046} 다른 레지스트리가 없어서 위와 같은 방법으로 해당 오류를 해결했다.

Dev/etc 2023.02.21

[JPA] cannot reliably process 'remove' call 오류(에러)해결

JPA로 테이블에 저장한 로우를 삭제하려고 했으나 다음과 같은 오류(에러)가 발생했다. * 오류(에러)메시지 No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call; nested exception is javax.persistence.TransactionRequiredException: No EntityManager with actual transaction available for current thread - cannot reliably process 'remove' call * 소스코드 public void function() { // 소스코드 중략... re..

Dev/Spring 2023.02.09

[Angular] 라우터(Router) unsubscribe

!주의 기록을 위한 포스트입니다. 자세한 설명은 없습니다. 이전포스트 [Angular] SPA URL 변경감지로 라우터 이벤트를 사용했다. https://walkerlab.tistory.com/19 [Angular] SPA URL 변경감지 !주의 기록을 위한 포스트입니다. 자세한 설명은 없습니다. constructor(private router: Router) { router.events.subscribe(val => { // URL(location) 변경시 마다 실행시킬 함수(이벤트) }); } 기본적으로 SPA일 때 페이 walkerlab.tistory.com 하지만 개발 도중 Router event subscribe 로 인해 문제가 있어 특정상황에서 subscribe를 해제해야 했다. 그래서 ngO..

Dev/Angular 2023.01.27

[CentOS7]리눅스 방화벽(firewall) 특정 IP 접근하는 방법

!주의 기록을 위한 포스트입니다. 자세한 설명은 없습니다. // firewall 설치 sudo yum install firewalld // 서버부팅/재부팅 시 자동으로 firewall 실행설정 sudo systemctl enable firewalld sudo systemctl start firewalld // 특정IP에대해 방화벽 해제하기 sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address=허용할 아이피 port port="22" protocol="tcp" accept' // 등록한 IP 해제하기 sudo firewall-cmd --permanent --remove-rich-rule='rule family="ip..

Dev/etc 2023.01.26

[errorlog][http-nio-8080-exec-6] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.StringIndexOutOfBoundsExcept..

!주의 본 포스트는 단순 기록하는 포스트입니다. [http-nio-8080-exec-6] ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: 0] with root cause java.lang.StringIndexOutOfBoundsException: String index out of range: 0 조회 시 ..

Dev/Spring 2020.05.08