Web239 config client, Actuator - spring boot 2.1 , 2.x 버전 다른점 보통 config client 를 사용하는 튜토리얼 문서를 보면actuator 가 쓰인다. 이게 1. 버전화 2. 버전이 좀 다르다 . 결론부터 말하자면 설정은 이런식 config serverspring.cloud.config.server.git.uri=~~~~ 여긴 git urlmanagement.endpoint.env.enabled=truemanagement.endpoints.web.exposure.include=*management.endpoints.web.base-path=/management.security.enabled=false config clinetserver.port=8080spring.application.name=applicationspring.cloud.config.uri=http.. Web/SpringBoot 2019. 3. 14. Spring Cloud Config - config server . 프로퍼티 파일 외부화 https://yonguri.tistory.com/entry/Spring-Cloud-Config-Server-%ED%99%98%EA%B2%BD%EA%B5%AC%EC%84%B1%EC%9D%98-%EC%99%B8%EB%B6%80%ED%99%94 https://devguide.tistory.com/entry/%EC%A0%9C4%EC%9E%A5-Spring-Cloud-Config-Config-Client-%EA%B8%B0%EB%B3%B8?category=657594 두가지 자료가 있음. 블로그 http://cloud.spring.io/spring-cloud-static/spring-cloud-config/2.0.0.M9/single/spring-cloud-config.html - 공식문서 위 두개의 설정대로 하.. Web/SpringBoot 2019. 3. 14. Multi Module Project 이란? Multi Module Project정의는 검색하면 바로나온다. 처음. 나는 공통 모듈을 만들고 싶어서 이걸 찾아봄.내가 말하는 공통모듈이란, 예를들어 몽고DB 클라이언트를 마이크로서비스 모든 프로젝트에서 한 클라이언트만 사용하여 나중에 추가 수정이 생길시 한개만 바꾸길 바랫다. (확실하진 않지만) 여태것 다른자료 모두 확인해본 결과 이거는 통짜 프로젝트에서 사용하는것 같다. 마이크로서비스가 아닌.. 뷰, api, 서비스, dao 등 각각 모듈이 있고 그 위에 root 가 있어서 모듈을 전체적으로 나눠 쓰는 것 따라서 내 의도와 다름. 이 방법은 두가지 방법을 사용함. 1. config cloud server 컨피그 서버 - properties 만 바꾸기 가능2. 해당 모듈 -> jar 로 만들어 imp.. Web/SpringBoot 2019. 3. 13. 리소스 추가 Add resources, config files to your jar using gradle https://stackoverflow.com/questions/24724383/add-resources-config-files-to-your-jar-using-gradle sourceSets { main { resources { srcDirs "src/main/resources", "src/main/configs" } } } Web/SpringBoot 2019. 3. 13. Spring Cloud + Docker + Docker Compose [참고 블로그 ] https://github.com/sqshq/PiggyMetrics--- 여기 좋음 https://roadmichi.blogspot.com/2016/06/spring-cloud-docker-docker-compose.html Web/SpringBoot 2019. 3. 6. 스프링부트 프로젝트 복사, 재활용 springboot, gradle 환경 와꾸 같게 사용하고싶을때 1. 폴더 복붙 후- 이름 변경 2. .project 파일, settings.gradle 파일 - name(프로젝트명) 변경 3. import - general - existing pro~~~~ 하면 일단 잘됨 후에 그래들 refresh 하던가 clean 하면 될듯 Web/SpringBoot 2019. 3. 6. Spring Boot profile 설정 https://dhsim86.github.io/web/2017/03/28/spring_boot_profile-post.html Spring Boot profile 나누는 여러가지 방법 Sping MVC 에서는…Spring Boot가 아닌 기존 Spring MVC 에서는 다음과 같이 maven 자체 profile 기능을 사용하는 경우가 많다. local true local true dev dev true prd prd true .... ${basedir}/src/main/resources-${environment} WEB-INF 위와 같이 설정하면 mvn package -Dlocal / mvn package -Ddev 이런식으로 profile 별로 사용하는 리소스를 다르게 할 수 있었다. Spring Bo.. Web/SpringBoot 2019. 3. 6. A Quick Guide to Spring @Value, value를 map 으로 받는거 I just announced the new Spring Boot 2 material, coming in REST With Spring:>> CHECK OUT THE COURSE1. OverviewIn this quick article, we’re going to have a look at the @Value Spring annotation.This annotation can be used for injecting values into fields in Spring-managed beans and it can be applied at the field or constructor/method parameter level.2. Setting up the ApplicationTo describe differe.. Web/SpringBoot 2019. 2. 27. @어노테이션 Annotation 및 bean 주입 @Qualifier @Qualifierhttps://www.logicbig.com/tutorials/spring-framework/spring-core/inject-bean-by-name.html @qualifier 사용하여 빈 주입을 따로 설정할때 사용한다. 같은 클래스가 중복될경우 필요함 http://wonwoo.ml/index.php/post/1701 @Primary https://preamtree.tistory.com/93 Web/SpringBoot 2019. 2. 22. springboot mybatis 기본 사용법 https://goddaehee.tistory.com/46 SpringBoot : Working with MyBatishttps://sivalabs.in/2016/03/springboot-working-with-mybatis/ Web/SpringBoot 2019. 2. 12. Spring boot Bean 생성 순서 정하는 방법, 생성되지 않은 Bean을 주입받으려고 하다가 실패했을 때 해결 방법 Spring boot에서 bean 등록 순서를 결정하는 방법 스프링/스프링부트에서 bean을 등록하는 방법은 여러가지가 있다.스프링부트에서는 Bean을 등록할 때 자바코드(Annotation)로 등록하는 것을 권장한다.따라서 스프링 부트를 사용하는 개발자들은 @Component, @Service, @Controller, @Repository, @Bean, @Configuration 등으로 Bean들을 등록하고 주입받아 사용하는게 일반적이다.그런데 프로그램 개발중에 아무 생각없이 여러 개의 Bean들을 등록해놓고 어떤 Bean에서 @Autowired로 자연스럽게 주입받아서 '사용'하려다가 에러를 만났다.바로 Bean에 '아직' 등록되지 않은 Bean을 클래스에서 사용하려고 했기 때문이다.무슨 얘기인지 Sp.. Web/SpringBoot 2019. 2. 11. Ehcache 3, JSR-107 and Spring 4.2 ehcahe 2 와 3 의 사용방법이 많이 다르다. 2는 기존 이용법도 많고 사용하기도 쉽긴한데.. 3는 분석하는데 오래걸릴뿐더러 .. 시간이 부족해 아직 연동하지 못함.. ㅜ 우선 연동이 좀 짜증난다는것만 기억하고 잇자 http://www.ehcache.org/blog/2016/05/18/ehcache3_jsr107_spring.html Web/SpringBoot 2019. 2. 11. 이전 1 ··· 4 5 6 7 8 9 10 ··· 20 다음