전체 글
-
Could not fetch model of type 'GradleBuild' using connection to Gradle distribution 에러툴 사용법/이클립스 2022. 2. 5. 21:53
김영한 선생님의 자료를 eclipse에서 import중 문제가 생겼다. 여러 블로그글을 참고했지만 처음에는 import -> gradle에서 gradle 버전을 local에 있는 것으로 바꾸라고 해서 바꿧는데 해도 되지 않아서 이렇게 시도하였더니 되었다. distributeUrl에서 gradle 6.8.2 버전을 받을 수 없다는 에러였는데, 기존에 프로젝트에있던 gradle wrapper와 gradle wrapper.properties를 복사하여 붙여넣어줬더니 해결되었다. 아니면 이와같이 하여도 된다.... 나중에 알았다 ㅠㅠ
-
@PostConstructSPRING 공부/어노테이션 2022. 2. 5. 21:48
인프런 강의에서 김영한 개발이사님의 강의를 듣고있었는데, 스프링 MVC 1편을 나는 듣지 않았기 때문에 강의 자료를 다운받아 Import 하여 보는중 해당 어노테이션을 발견했다. The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization. This method must be invoked before the class is put into service. This annotation must be supported on all classes that support dependency injection. The met..
-
템플릿 엔진SPRING 공부/기타 2022. 2. 1. 13:24
템플릿 엔진이란?? 템플릿 양식과 특정 데이터 모델에 따른 입력 자료를 합성하여 결과 문서를 출력하는 소프트웨어를 말한다. 쉽게 말하면 HTML, CSS + DATA 역할을 해주는 소프트웨어이다. 템플릿 엔진은 서버 사이드와 클라이언트 사이드로 나눠지게 된다. Server Template Engine 서버에서 렌더링 해주는 템플릿 엔진을 말한다. 속도가 매우 빠르고, 작성하기가 편하지만 클라이언트에서의 동적인 처리는 어렵다. Server 사이드 템플릿 엔진에는 Freemarker와 Thymeleaf , JSP 등이 있는데, 스프링에서 자주 사용하는 것은 JSP, Thymeleaf가 있다. 둘다 사용해보았기 때문에 소감을 말하자면 JSP 가장 많이 사용한 만큼 , 구글링도 편하다. 또한 JSP내에서 JAV..
-
ORM , SQLMapperSPRING 공부 2022. 1. 27. 09:07
ORM, SQLMapper는 꼭 Spring에만 있는 기술이 아니다. 이점에 유념하자 ORM Object Relational Mapping 직역하면 '객체 관계적 연결'로 SQL에 존재하는 Object와 애플리케이션 내에 존재하는 Object를 관계 매핑을 해준다는 것이다. 예를 들어 쉽게 설명하자면, 우리가 코드로 생성한 Object를 SQL에서 생성한 테이블과 일치시키고, 그에 따른 CRUD를 자동 생성화 한다는 것이다. 이 과정에서 우리가 직접 쿼리를 짤 필요성이 줄어든다는게 가장 큰 이유고, ORM에 존재하는 메서드화된 코드로 긴 쿼리 작성없이 생산성을 높일 수 있다는 것이 크다. 이렇게나 편한데 왜 사용을 모든 기업들은 JPA 도입을 하지 않을까??? 1. 학습곡선이 크다. ( 앞으로 설명할 S..
-
REST , REST APISPRING 공부 2022. 1. 25. 00:54
@RequestMapping(value = "/stomp/member", method=RequestMethod.GET) public String getChatMemberList() throws Exception{ JSONObject js = new JSONObject(); JSONArray jsonArr = new JSONArray(); for (Entry entry : StompWebSocketConfig.sessionMap.entrySet()) { JSONObject json = new JSONObject(); json.put("ipAddress", entry.getValue().getIpAddress()); json.put("conCnt", entry.getValue().getConCnt()); j..
-
Spring Servlet의 원리SPRING 공부/서블릿 2022. 1. 19. 01:59
Servlet이란? 웹 프로그래밍에서 클라이언트 요청을 처리하고 , 처리결과를 클라이언트에 전송하는 기술 자바로 구현된 CGI(Common gateway Interface)이다. Servlet의 생명 주기 Web Server 에서 HttpRequest를 Web container에게 위임한다. 클라이언트 URL 요청이 들어오면, WebContainer가 URL 매핑을 통해 Servlet을 실행한다. 처음 실행시 Init()메서드를 통해 Servlet을 초기화한다. Serlvet이 메모리에 적재되어있으면 Thread를 생성하고 Service()를 실행해 요청에 대한 처리와 응답을 수행한다. service()메소드 실행시 method 타입에 따라 doGet() , doPost()가 호출된다. 요청이 끝나면 T..
-
GC 튜닝JAVA공부/JVM 2022. 1. 14. 01:54
GC튜닝이 필요한 경우 JVM옵션 중 Xms 옵션과 Xmx 옵션으로 메모리 크기를 지정하지 않았다. -Server 옵션이 포함되어있지 않다. 시스템에 Timeout 로그와 같은 로그가 남는다. 심플한 튜닝 1.String 객체 대신 StringBuilder 혹은 StringBuffer를 사용한다. 2.Log를 적게 쌓는다. 방법 첫번째 : Old영역으로 넘어가는 객체의 수 최소화 하기 New영역을 크기를 조정해서 혹은 Old영역과의 New 영역과의 비율을 조정해서 Old영역으로 넘어가는 객체 수를 줄여 Full GC가 일어나는 횟수를 줄여준다. 방법 두번째 : Full GC 시간을 줄이자 Full GC실행 시간은 Minor GC에 비해 길기 때문에 Old 영역의 크기를 잘 조정해서 Full GC 용량을 ..