Programming! 썸네일형 리스트형 Spring boot 에서 RestTemplateBuilder 문제. @Configurationpublic class RestTemplateConfiguration { private MappingJackson2HttpMessageConverter customJackson2HttpMessageConverter() { ..... } // 예제에 간혹 나오는 코드 @Bean("restTemplate") public RestTemplate restTemplate(RestTemplateBuilder builder) { builder.additionalMessageConverters(Lists.newArrayList(customJackson2HttpMessageConverter(), new FormHttpMessageConverter())); return builder.build().. 더보기 JSON Array 처리중 단일 데이터의 경우 문제. 타 사이트와 Json 으로 데이터 통신을 할경우, 명세에는 분명 LIST로 되어 있는데, 결과가 하나인 경우 단일 데이터로 보내는 경우가 있다. 이런식이 명세인데... { "names" : [ "Jhon", "Doe" ] } 하나의 경우 이렇게 보내는.. { "names" : "Jhon" } 만약 ObjectMapper를 쓴다면 설정으로 ACCEPT_SINGLE_VALUE_AS_ARRAY를 지정해주면 된다. ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); 더보기 Eclipse에서 IntelliJ로 전환하면서.. 1. Java SDK 문제 Windows나 MacOS에서는 딱히 설정하지 않았던거 같은데(아마 설정에 지정되어 있어서..) Ubuntu 기본환경에서 시작하니 기본적으로 지정된 Java SDK를 가져오지 못하는거 같다. 아래의 시작화면에서 Configure를 클릭하여 "Project Defaults -> Project Structure"로 이동 후, JAVA 설치위치를 지정해주면 된다. 2. Lombok Plugin Lombok plugin 설치 후, "Settings->Build,Execution,Deployment->Compiler->Annotation Processors"의 Enable Annotation Processing을 체크해준다. 3. Code StyleGoogle Style Guide인데... 더보기 [Docker] Memcached 서버에 Spring Simple Memcached(SSM) 연동하기 지난 post에 이어서, 우선 정상적으로 memcached서버가 운영되고 있는지 client나 ps로 확인해보자.$ docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES141fe50f0cc0 mysql:latest "docker-entrypoint..." 2 days ago Up 3 seconds 0.0.0.0:3306->3306/tcp docker-mysqla035ab1ff691 memcached "docker-entrypoint..." 3 days ago Up 9 seconds 0.0.0.0:11211->11211/tcp docker-memcache build.gradle에 ssm에 관련된 lib를 추가한 후, builddef ssmV.. 더보기 Spring Boot + Schedule 웹 스크래핑 해보기 우선 기본 플젝의 gradle은 기존과 동일하다. (joda time lib만 추가)...dependencies { compile group: 'joda-time', name: 'joda-time', version: '2.9.7' compile('org.projectlombok:lombok') compile("org.springframework.boot:spring-boot-starter") testCompile("org.springframework.boot:spring-boot-starter-test")} ... 첫번째로 스케쥴만 진행해보자. 스케쥴의 경우는 @EnableScheduling 만 추가하면 설정에서 딱히 할 건 없다.@EnableScheduling@SpringBootApplicationpu.. 더보기 이전 1 ··· 18 19 20 21 22 23 24 ··· 56 다음