본문 바로가기

Programing

(405)
[macOS] git 에러 에러 화면 xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun 해결책 xcode를 설치하지 않았을 때 발생한다. 아래 명령을 이용하여 설치 가능하다. xcode-select --install 라이센스 더보기 APPLE INC. MACOS SDK 및 XCODE계약 개발자 소프트웨어(아래에 정의됨)를 사용하기 전에 반드시 본 MACOS SDK 및 XCODE 계약(이하 “사용권”)을 유의하여 읽어 주십시오. 개발자 소프트웨어를 사용함으로써, 귀하는 본 사용권의 약관을 준수하기로 동의하는 것입니다..
[spring boot] 2.1.6 -> 2.2.0 테스트 깨짐(인코딩) 무엇이 바뀌었길래 테스트가 깨지는가? org.springframework.test.web.servlet.MockMvc 를 이용한 Mock 컨트롤러 테스트. 한글 인코딩이 깨진다. MockMvc의 경우 perform이 수행되면 MockFilterChain -> HttpServlet -> TestDisplacherServlet -> FrameworkServlet -> HttpServlet - FrameworkServlet -> DispatcherServlet -> AbstractHandlerMethodAdapter ... 등을 거치다. application/json의경우 HttpEntityMethodProcessor 의 handleReturnValue에서 AbstractMessageConverterMetho..
[spring integration] TCP 연결시간 설정 버전 의존성 Spring boot Spring core Spring integration Jackson core 2.1.6 5.1.8 5.1.6 2.9.0 2.2.0 5.2.0 5.2.0 2.10.0 2.2.4 5.2.3 5.2.3 2.10.2 2.2.5 5.2.4 5.2.4 2.10.2 TCP 통신을 하는 것을 만들고 있는데, 아직 상대방 방화벽이 닫혀있는지 긴 타임아웃이 발생하였다. 기본 연결 대기 시간 이전에 timeout이 발생하게 하고 싶었다. AbstractClientConnectionFactory 에 정의되어 있는 기본 연결 타임아웃은 60초이다. 구현체에서 소켓을 만들때 getConnectTimeout() 이라는 메서드를 통해 값을 구해온다. 예) https://github.com/spri..
[Apache Lucene] Lucene의 의미는? 사실 사람의 이름이라 의미를 찾기는 어렵다. Lucene을 만든 Doug Cutting 의 아내의 미들네임이 Lucene인 것과 그의 아내의 할머니의 이름이 루씬이다. 출처: Barker, Deane (2016). Web Content Management. O'Reilly. p. 233. ISBN 1491908106
[python] BeautifulSoup 로 XML 처리하기 엄밀히 이야기 하면 XML은 아니나 마크업 문서를 처리하기 위함이다. from bs4 import BeautifulSoup with open("user.xml") as fp: soup = BeautifulSoup(fp, 'html.parser') body = soup.grid.body.b for ele in body.find_all("i"): print ele["name"].encode('utf8') 처리하다 발견한 예외 UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128) 관련내용: https://ourcstory.tistory.com/39 처리방법: .encode('utf8')
[python] Python의 버전 관리 툴 pyenv 설치 사이트: https://github.com/pyenv/pyenv homebrew가 설치되어 있으면 아래 명령으로 설치 가능 $ brew install pyenv 설치가 가능한 목록 확인 $ pyenv install -l Available versions: 2.1.3 2.2.3 ... 3.8.1 버전 설치 $ pyenv install 3.8.1 pyenv shell 먼저 사용을 위해서는 pyenv init 명령 수행이 필요하다. $ pyenv shell pyenv: shell integration not enabled. Run `pyenv init' for instructions $ pyenv init # Load pyenv automatically by appending # the following to..
[tomcat] HttpServletRequest.getHeader 헤더를 보면 가끔 대소문자를 가리지 않고 동작하는 경우가 있어서 확인을 해보았다. package javax.servlet.http; public interface HttpServletRequest extends ServletRequest { /** * Returns the value of the specified request header as a * String. If the request did not include a header of the * specified name, this method returns null. If there are * multiple headers with the same name, this method returns the first head * in the reque..
[Spring] mvc - DispatcherServlet 1부 서블릿과 스프링 MVC는 밀접하면서 독립적이다. DispatcherServlet 클래스는 HTTP 요청을 처리하는 중심 디스패처 클래스이다. DispatcherServlet 클래스는 아래와 같은 계층 구조를 가진다. Servlet 인터페이스 서블릿의 핵심은 요청과 응답이다. ServletRequest과 ServletResponse가 요청 및 응답을 추상화해놓은 인터페이스이다. public interface Servlet { // .. public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException; HttpServlet 추상 클래스 Servlet 인터페이스의 구현체인 HttpServlet 라는 ..