반응형
반응형
Go언어에서 YAML 라이브러리를 이용하면 간편하게 YMAL 값을 다룰 수 있다. 해당 라이브러리의 문서는 아래에서 확인할 수 있다. https://pkg.go.dev/gopkg.in/yaml.v3 간단하게 YAML를 언마샬링 하는 예제를 확인해보자. - person.yaml name: Martin D'vloper job: Developer skill: Elite employed: True foods: - Apple - Orange - Strawberry - Mango languages: perl: Elite python: Elite 이전에 학습했듯이 json를 다루는 방식과 거의 동일하다. - [go] JSON 다루기 필드 태그 형식은 다음과 같다. yaml:"[][,[,]]" package main ..
보통 쿠버네티스 클러스터를 제어하기 위해서 커맨드 라인 도구인 k9s 설치하고 간단하게 사용하는 방법에 대해 알아보자. 설치 macOS 기준으로 Hombrew를 통해 설치할 수 있다. brew install k9s 사용 대략적인 명령어는 다음과 같다. # List all available CLI options k9s help # Get info about K9s runtime (logs, configs, etc..) k9s info # Run K9s in a given namespace. k9s -n mycoolns # Run K9s and launch in pod view via the pod command. k9s -c pod # Start K9s in a non default KubeConfig c..
Spring Boot에서 로컬, 개발, 실서비스 같은 여러 환경을 하나의 application.yml 파일에 설정하고 사용하는 방법에 대해서 알아보자. YAML 설정 하나의 application.yml 파일에 여러 환경의 설정 정보를 저장하려면 spring.profiles 를 통해 설정하면 된다. ---로 구분 한다. # local, dev, prod 공통 설정 server: port: 8080 tomcat: uri-encoding: UTF-8 --- spring: profiles: local datasource: url: "jdbc:mysql://test-server/test" username: "dbuser" password: "dbpass" --- spring: profiles: dev dataso..