본문 바로가기

전체 글

(56)
Jupyter Notebook과 Nginx proxy nginx로 프록시 설정 후 jupyter notebook을 접속하면 접속 및 접근은 되는데 정상적인 작동을 하지 않는다. location / { proxy_pass http://localhost:8888; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Upgrade "websocket"; proxy_set_header Connection "Upgrade"; proxy_read_timeout 86400; }
SpringValidatorAdapter SpringValidatorAdapter.java는 스프링 프레임워크의 데이터 유효성 검사(validation)를 지원하는 클래스입니다. 이 클래스는 JSR-303/JSR-349 Bean Validation API와 함께 사용되며, 스프링에서 제공하는 Validator 인터페이스와 Bean Validation API를 연결하는 역할을 합니다. 스프링 프레임워크의 SpringValidatorAdapter는 다음과 같은 기능을 수행합니다: Bean Validation API를 사용하여 개체(object)의 유효성 검사를 수행합니다. 유효하지 않은 속성에 대한 오류 정보를 스프링의 에러 표현 방식에 맞게 변환합니다. 스프링 프레임워크의 Validator 인터페이스를 구현하므로, 스프링에서 사용할 수 있는 표준..
RestTemplate maxConnTotal: 총 접속할 소켓 수 maxConnPerRoute: 요청 경로에 배당될 소켓 수 maxConnTotal의 설정 수 만큼 os 소켓 열림. maxConnPerRoute의 설정 수 만큼 동일 경로에 요청할 소켓의 수가 설정됨. ex) maxConnTotal: 10, maxConnPerRoute: 2 인경우 http://localhost:8080/a 경로에 restTemplate을 이용하여 a 경로에 10개의 요청을 한번에 한 경우 maxConnTotal에 의해 소켓은 10개가 열릴수 있지만, maxConnPerRoute로 경로에 대한 제한이 걸려있어 동일 경로 a에 대한 요청은 2개의 소켓만 활용이 된다. http://localhost:8080/a/{variable} 과 같은 Path..
@Configuration annotation proxyBeanMethods default: true since: 5.2 enforceUniqueMethods default: true since: 6.0
allowInsecureProtocol gradle을 이용하여 dependency 를 추가 할때 외부 저장소 중 https가 아닌 http로 주소를 제공할 경우 보안상의 이유로 에러가 발생한다. repositories { mavenCentral() maven { url "http://domain" allowInsecureProtocol true } }위와 같이 allowInsecureProtocol의 설정을 TRUE로 하면 http를 허용하여 진행할 수 있다.
디미터(데메테르) 법칙(Law of Demeter) Each unit should have only limited knowledge about other units: only units "closely" related to the current unit. Each unit should only talk to its friends; don't talk to strangers. Only talk to your immediate friends. - demeter project 에서 유래된 이름이다. - 자료구조인 경우는 디미터 법칙이 적용되지 않는다. - 메소드 호출에 대한 규칙 자신의 메서드 파라미터로 넘어온 객체들의 메서드 메서드 내부에서 인스턴스화된 객체 객체의 속성 - 객체는 다른 메서드에서 반환된 개체의 메서드를 호출하지 말아야 한다. "하나의 점만 ..
certbot $sudo certbot --nginx Saving debug log to /var/log/letsencrypt/letsencrypt.log Please enter the domain name(s) you would like on your certificate (comma and/or space separated) (Enter 'c' to cancel): "domain" Renewing an existing certificate for "domain" Successfully received certificate. Certificate is saved at: /etc/letsencrypt/live/"domain"/fullchain.pem Key is saved at: /etc/letsencrypt/live..
[이펙트 자바] 아이템4. 인스턴스화를 막으려거든 private 생성자를 사용하라 명시적으로 생성자를 작성하지 않으면 컴파일러가 자동으로 기본 생성자를 생성한다. 매개변수를 받지 않는 public 생성자 만들어지며, 사용자는 이 생성자가 자동 생성된 것인지 구분할 수 없다. public class UtilClass { // 생성자가 작성하지 않으면 기본적으로 컴파일러는 public 생성자가 만들어진다. public static int sum(int a, int b) { return a + b; } // etc } 정적 멤버 혹은 정적 메소드들로 구성된 유틸리티 클래스는 인스턴스로 만들어 쓰려고 설계한게 아니다. 그러므로 생성자를 작성하여 컴파일러가 자동으로 생성자를 만드는 행위를 막는다. public class UtilClass { private UtilClass() { // Exce..