전체 글

본 설정은 Data Grip 혹은 Intellij IDEA Ultimate 버전에서만 정상 작동합니다. Community 버전은 Out! Step By Step 1. Install SQL Server SQL Server 다운로드 SQL Server Management Service (SSMS) 다운로드 2. SQL Server Browser 활성화 만약 '시작' 버튼이 비활성화 되어있다면 3번 스탭을 설정 3. SQL Server Agent 활성화 4. TCP/IP 연결 활성화 SQL Server 기본 포트는 1433번. 여기까지 하고나서 SQL Server 재시작을 하라. 5. 로그인 사용자 생성 6. 로그인 사용자 권한 설정 Connection Refused? The TCP/IP connection ..
· JVM/Spring
Servlet 역할 Http Request, Response 에 필요한 필수 기능을 제공하여 개발자가 비즈니스 로직에만 집중하게 해준다. TCP Socket connection 관리 HTTP Request URL, Header, Body 파싱 HTTP Response Header, Body 생성 Servlet 생명 주기 간단하게는 init -> service-> destroy 를 거친다. 1. init() WAS (e.g. Tomcat) 이 띄워질 때 최초로 미리 등록해둔 서블릿을 모두 '싱글톤'으로 생성해둔다. @WebServlet(name = "HelloServlet", urlPatterns = "Hello") public class HelloServlet extends HttpServlet { @O..
· JVM/Spring
개요 @Sl4j 로 SpringBoot는 기본 로거를 내장하는데 요녀석으로 로깅 정책, 패턴, 저장 위치를 결정할 수 있다 logback-spring.xml main/resources 에 두면된다. 주석을 참고하자. 본 프로젝트에 갈기면된다. 로그 레벨에 따라 프로젝트 루트에 logs/error.log logs/info.log logs/warn.log 'RollingFileAppender' 클래스를 통해 최대 용량 혹은 보관기간이 지나면 새 파일을 저장한다. [%d{yyyy-MM-dd HH:mm:ss.SSS}:%-3relative][%thread] %-5level %logger{36} - %msg%n [%d{yyyy-MM-dd HH:mm:ss.SSS}:%-3relative][%thread] %-5leve..
· JVM/Spring
사전 조건 application.yaml 설정 dependency 설정 spring-boot-configuration-processor annotationProcessor 를 추가해줘야한다. Java 순서 1. ConfigurationProperties 등록 on ConfigClass @Getter @RequiredArgsConstructor @ConfigurationProperties(prefix = "server") public class ServerConfig { private final String port; private final String ip; private final String hostname; } 2. ConfigurationPropertiesScan 등록 on main @Sprin..
· JVM/Spring
There's no strict stnadard naming convention in SpringBoot, Howevere there's some best practice. Controller Layer The methods in the controller should be named based on the HTTP method. getUser postUser deleteOrder Service Layer Methods in service layer should be descriptive and prefixed with a verb createUser() updateUser() deleteUser() Persistence Layer Methods in persistence layer named data ..
· JVM/Error
문제 SpringBoot 를 사용한 프로젝트 중 HttpServletRequest 를 받아와 헤더 정보를 출력하는 코드에서 제목과 같은 에러를 만났다. import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @Slf4j @RestController public class LoggingController { @GetMapp..
M_Falcon
Falcon