서버 프로그래밍(282)
-
Spring Boot RestTemplate을 이용한 HTTP 통신
Spring Boot에서는 RestTemplate을 이용하면 HTTP 통신이 쉽게 가능하다. Consuming a RESTful Web Servicehttps://spring.io/guides/gs/consuming-rest/ Spring에서 RestTemplate을 사용하여 REST 기반 서비스 요청과 테스트하기http://blog.saltfactory.net/using-resttemplate-in-spring/ Spring, RestTemplate으로 REST 클라이언트 구현하기http://jsonobject.tistory.com/237 [컴][웹] Spring 에서 REST API 호출하기http://i5on9i.blogspot.kr/2014/12/spring-rest-api.htmlpostForO..
2018.02.12 -
Spring Boot에서 멀티 데이터베이스 연동하기
Spring Boot 프레임워크에서 PostgreSQL과 MongoDB와 같이 이종 데이터베이스를 여러개 연동하기 위한 방법이 필요한데, 생각보다 레퍼런스가 많지는 않다.동시에 사용할 때, PostgreSQL은 별도의 Config 클래스를 만들어서 사용하면 되지만 MongoDB는 굳이 Config 클래스를 만들지 않아도 된다. 이 떄문에 쓸데없이 시간 낭비를 했다. ㅠㅠ 스프링 다중 DB 사용하기https://gs.saro.me/#!m=elec&jn=751 Spring Boot MongoDBhttp://jinhokwon.tistory.com/42Accessing Data with MongoDBhttps://spring.io/guides/gs/accessing-data-mongodb/ 일부러 몽고디비 두대..
2018.02.09 -
AngularJS 4 개발 관련 자료
Using Bootstrap with Angularhttps://medium.com/codingthesmartway-com-blog/using-bootstrap-with-angular-c83c3cee3f4a Angular 4.3 HttpClient (Accessing REST Web Services With Angular)https://medium.com/codingthesmartway-com-blog/angular-4-3-httpclient-accessing-rest-web-services-with-angular-2305b8fd654b Angular 4 Event Bindinghttps://coursetro.com/posts/code/59/Angular-4-Event-BindingEvent Bindin..
2018.01.25 -
Spring Boot, PostgreSQL을 이용한 RESTful API, WebSocket 구현
Eclipse Srping Boot 웹프로젝트 생성 / 가동http://jsijsi99.tistory.com/6?category=710810 Spring boot 기반 REST API 제작https://medium.com/@devAsterisk/spring-boot-%EA%B8%B0%EB%B0%98-rest-api-%EC%A0%9C%EC%9E%91-2-79c484fcadbe Spring Boot RESTFul Web Service Example – GET/POST/PUT/PATCH/DELETEhttp://www.namooz.com/2016/12/10/spring-boot-restful-web-service-example-get-post-put-delete-patch/ SpringBoot JPA 예제htt..
2018.01.24 -
MongoDB 타임 존 관련 이슈
Elasticsearch에 저장된 한국/서울 기준의 시간 정보를 MongoDB에서 조회하려니 뭔가 맞지 않는다. 그래서 이유를 찾아보니 MongoDB의 타임 존이 UTC로 고정되어 있기 때문이란다. 그래서 다음과 같이 조치를 하니 정상적으로 처리된다.db.logs.count({type:1234,created_at:{$gte:new Date("2017-12-28T00:00").getTime()-(9*3600000)}}) MongoDB의 Timezone은 UTC로 고정되어있다.MongoDB 공식가이드는 이를 Application Layer에서 설정하라고 안내한다. UTC와 차이가나는 9시간을 더해서 사용하라는 것이다. (https://docs.mongodb.com/v3.2/tutorial/model-time..
2017.12.29 -
Elasticsearch 관련 레퍼런스
range filter와 match 조건을 함께 쿼리하는 방법GET index12345678/_search{ "query": { "bool": { "should": [ { "match": { "type" : 1234 } } ], "minimum_number_should_match": 1, "filter": { "range" : { "created_at" : {"gte":1514386800000} } } } }} https://stackoverflow.com/questions/44306569/malformed-query-expected-end-object-but-found-field-name-error-in-kibana-elastGET _search { "query": { "bool": { "should"..
2017.12.29