[CI/CD] Github Actions, AWS S3, AWS CodeDeploy를 이용한 CI/CD - 2
·
Server/Infra
이전글 [CI/CD] Github Actions, S3, CodeDeploy를 이용한 CI/CD - 1이전글 https://chordplaylist.tistory.com/283 [CI/CD] Github Actions, S3, CodeDeploy를 이용한 CI/CD - 0 Github actions Github Repository에서 Actions로 들어가게 되면, 현재 내가 사용하는 언어에 맞게 스크립트를 구성해서chordplaylist.tistory.comGihub Secrets/ 환경변수 설정해당 Repository의 Settings 탭의 Secrets and variables 메뉴에 있는 Actions를 눌러서 위와 같은 페이지로 이동한다.이동 후 New repository secret버튼을 선택..
[CI/CD] Github Actions, AWS S3, AWS CodeDeploy를 이용한 CI/CD - 1
·
Server/Infra
이전글https://chordplaylist.tistory.com/283 [CI/CD] Github Actions, S3, CodeDeploy를 이용한 CI/CD - 0Github actions Github Repository에서 Actions로 들어가게 되면, 현재 내가 사용하는 언어에 맞게 스크립트를 구성해서 제공해주고 있다. 나는 현재 Gradle로 구축된 Java Spring으로 개발을 진행하고 있으므로chordplaylist.tistory.com AWS S3 연동S3 생성 [AWS S3] 버킷 생성버킷 생성 AWS S3 페이지에서 버킷 만들기를 클릭합니다. 버킷 이름에는 사용자가 원하는 이름을 작성합니다. AWS 리전은 현재 살고 있는 지역(나라)을 선택합니다. 객체 소유권의 경우에는 현재cho..
[CI/CD] Github Actions, S3, CodeDeploy를 이용한 CI/CD - 0
·
Server/Infra
Github actions Github Repository에서 Actions로 들어가게 되면, 현재 내가 사용하는 언어에 맞게 스크립트를 구성해서 제공해주고 있다. 나는 현재 Gradle로 구축된 Java Spring으로 개발을 진행하고 있으므로 Java With Gradle를 선택했다. 스크립트 # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # This workflow will build a Java pro..
[Spring Security] Spring Security을 추가하면 왜 로그인 화면으로 넘어가는 걸까?
·
Server/Spring&Spring Boot
의문 build.gradle에 Spring Security를 추가하게 되면 로그인 화면으로 넘어가는 것을 볼 수 있다. dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' } 그렇다면 왜 로그인 화면으로 넘어가게 되는 걸까? 원인을 찾아라 우리는 로그인 화면으로 넘어가지 않도록 SpringConfig라는 것을 만들고, SeuciryFilterChain를 재정의하며 permitAll() 메서드를 사용해서 로그인 창이 뜨지 않고 원하는 페이지에 접속할 수 있도록 설정하고 있다. 그래서 SecurityFilterChain에 대해 알아보기로 했다. SecurityFilterChain public interfac..
[Web Font] 웹 폰트를 사용하여 페이지 로딩 속도 개선
·
Front/HTML&CSS&JS
프로젝트를 마무리 짓고, 여러 사람들의 피드백을 받던 도중 사이트 속도 개선이 필요할 것 같다는 얘기를 듣게 되었다. 문제가 무엇일까 화면을 뜯어보던 중, 4.7mb 달하는 폰트가 눈에 가장 먼저 들어오게 되었다. 요즘 시대에 4.7mb가 무슨 문제일까 생각할 수도 있겠지만 매 번 페이지를 들어갈 때마다 4.7mb를 다운로드하고 있는 그 상황을 경험한다면 유쾌할 수 없을 거라고 생각한다. 현재 폰트를 불러오는 방식은 로컬 스토리지에 폰트를 저장하고 불러오고 있었다. 프로젝트 내부에 폴더를 만들고 폰트를 저장하여 불러오는 형식이었다. 현재 @font-face { font-family: 'beanpoleM'; src: local('beanpoleM'), url('../fonts/beanpoleM.otf') ..
[Spring colud] open feign 사용법
·
Server/Spring&Spring Boot
사용 계기 공공 api를 사용하는 미니 프로젝트를 진행하던 도중, 스프링 내부에서 외부 api를 호출해야 하는 상황이 발생. 기존에는 RestTemplate라는 것을 사용하였으나, Netfilx에서 FeignClient라는 것을 개발하여 대체되었다. 그래서 처음에는 Spring Cloud Nextlix Feign으로 불리었으나, 오픈 소스 변경 후 Spring Colud OpenFeign에 통합되면서 이름이 바뀌었고 SpringMVC 어노테이션에 대한 지원 및 HttpMessageConverters를 사용할 수 있게 되었다. 의존성 추가 dependencies { ... implementation 'org.springframework.cloud:spring-cloud-starter-openfeign:3...
[Spring cloud starter Error] creating bean with name 'configurationPropertiesBeans' defined in class path resource ...
·
Server/Error
에러 Error creating bean with name 'configurationPropertiesBeans' defined in class path resource [org/springframework/cloud/autoconfigure/ConfigurationPropertiesRebinderAutoConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.cloud.context.properties.ConfigurationPropertiesBeans]..
[Thymeleaf] th:object, th:field 사용법
·
Server/Spring&Spring Boot
타임리프를 사용하기 위해, 여러 블로그들을 찾다 보면 th:object로 DTO에 값을 전달해 주는 코드를 많이 보게 되었다. 무작정 th:object에 PostMapping에서 @ModelAttribute에 name으로 지정된 값을 작성하면 빨간 줄이 뜨면서 에러가 발생하였다. th:object는 어떻게 사용할 수 있을까? Controller Controller에서 해당 View를 받아오는 @GetMapping이 된 웹서버에 th:object로 사용할 객체를 생성하여 Model로 저장해 주어야 th:object를 사용할 수 있다. @GetMapping("/writeForm") public String writeForm( @SessionAttribute(name = "loginUser", required..
코드플리
코드 플레이 리스트