본문 바로가기

반응형

전체 글

(53)
Could not reliably determine the server's fully qualified domain name ➜ sudo apachectl -k restart AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using {MY_LOCAL}. Set the 'ServerName' directive globally to suppress this message apache를 재시작해도 계속 생기는 에러.. 찾아봐도 httpd.conf 파일의 ServerName 부분의 주석을 제거하고 localhost로 수정하라는 말 뿐 ㅠㅠ 분명히 httpd.conf 파일에 ServerName 부분을 localhost로 바꿔줬는데 계속 오류 문구는 바뀌지 않았다. https://stackoverflow.com/questions/..
Mac OSX 맥에서 apache2에 mod_jk.so 추가하기 apache2의 module에 mod_jk를 추가하는 이유는 생략... ➜ apachectl -t httpd: Syntax error on line 191 of /private/etc/apache2/httpd.conf: Cannot load modules/mod_jk.so into server: dlopen(/usr/modules/mod_jk.so, 10): image not found 이미 빌드 된 mod_jk.so를 추가해주고 싶었지만,,, 아파치를 실행하면 위와 같은 문제가 계속 생겼다... 그 이유는 modules에 추가한 mod_jk.so 파일이 읽혀지지 않는 것.. 이유는 아마도 비트나 컴파일 버전의 문제인 것 같다. ➜ apachectl -v Server version: Apache/2.4...
Apache2와 httpd OSX(맥 OS)에 기본적으로 깔려 있는 Apache2 - apachectl 아파치 관련 수많은 예제들에서 나오는 httpd는 무엇이 다른걸까? https://httpd.apache.org/docs/2.2/ko/programs/apachectl.html apachectl - 아파치 웹서버 조절 인터페이스 - Apache HTTP Server Version 2.2 Please note This document refers to the 2.2 version of Apache httpd, which is no longer maintained. The active release is documented here. If you have not already upgraded, please follow this li..
스프링 Dependency Injection은 어떻게 동작할까? 왜 JUnit 테스트에서 @Autowired한 bookService 필드는 아무런 초기화를 안했는데 왜 null이 아닐까? 리플렉션 API: 클래스 정보 조회 docs.oracle.com/javase/8/docs/api/index.html Java Platform SE 8 docs.oracle.com Class API 사용하기 Class 메소드를 통해서 필드, 상위 클래스, 클래스가 구현하고 있는 인터페이스, 메소드 목록 등을 가져올 수 있다.
HttpMessageConverters HttpMessageConverters HttpMessageConverters는 스프링 프레임워크에서 제공하는 인터페이스이다. HTTP 요청 본문을 객체로 변경하거나, 객체를 HTTP 응답 본문으로 변경할 때 사용한다. 사용하는 HttpmessageConverter는 여러가지가 있고, 우리가 어떤 요청을 받았는지, 응답을 보내는지에 따라서 메세지컨버터가 달라진다. @RequestBody @ResponseBody 아래에서 User(객체)를 리턴할 때는 기본적으로 JsonMessageConverter가 사용이되고, String타입을 이턴할 때는 StringMessageConverter가 사용이 된다. int도 마찬가지로 StringMessageConverter이다. @RestController면 @Respo..
ResponseEntity란? docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/ResponseEntity.html
URI 패턴 https://stackoverflow.com/questions/176264/what-is-the-difference-between-a-uri-a-url-and-a-urn What is the difference between a URI, a URL and a URN? People talk about URLs, URIs, and URNs as if they're different things, but they look the same to the naked eye. What are the distinguishable differences between them? stackoverflow.com URI -- Uniform Resource Identifier URIs are a standard for ide..
Spring RestTemplate RestTemplate란? Spring 3.0 부터 지원, 스프링이 제공하는 HTTP 통신에 유용하게 사용 할 수 있는 템플릿이며, HTTP 서버와의 통신을 단순화하고 RESTful 원칙을 지키고 있다. RestTemplate는 Spring에서 제공하고 있는 JdbcTemplate같은 Template로, RESTful Service 호출과 응답에 관련된 여러 메소드를 제공하고, REST 클라이언트를 쉽게 개발할 수 있도록 만들어진 Template이다. 기계적이고 반복적인 코드를 최대한 줄여줌 - url이랑 response 받을 Class나 Object 설정 등 RESTful 형식에 맞춤 json, xml을 쉽게 응답 받음 RestTemplate에서 제공하는 getForObject() 메소드를 사용하면 서..

반응형