전체 글72 스프링부트에서 html 템플릿 조회하기 이메일 인증 서비스를 구현하다보니 이메일의 내용을 템플릿으로 만들어 필요한 인증코드 값만 넘겨주면 Java 코드에서는 더 간단하게 코드를 작성할 수 있을 것 같았습니다. 그래서 이메일에 들어갈 본문을 html 파일로 작성을 하고 작성한 html 파일을 조회를 해야하는 기능이 필요했습니다. 개발 환경 개발 구성 IDE: IntelliJ JDK 버전 : 17 스프링부트 : 3.1.0 언어 : Java 플러그인 dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'ognl:ognl:3.4.2' } 위의 플러그인을 추가해줍니다. thymeleaf 플러그인은 '템플릿 엔진'의 일종입니.. 2024. 1. 30. 스프링부트로 Google OAuth 2.0 개발하기 OAuth 란 개발 환경 JDK 17 Spring boot 버전 : 3.0.6 PostgreSQL : 14.0 사용 플러그인 implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spr.. 2024. 1. 30. SwiftUI 에서 Binding이란 무엇인가? Binding은 자식 뷰에 값을 전달하여 변경된 값을 적용시키기 위해 Binding 을 사용한다. 기본 코드 struct BindingView: View { @State private var isShowing: Bool = false var body: some View { VStack { if isShowing Text("Show View") else Text("Hide View") button(isShowing: $isShowing) } } } struct button: View { @Binding var isShowing: Bool var body: some View { Button(isShowing? "SHOW" : "HIDE") { isShowing.toggle() } } } struct Cont.. 2023. 1. 9. SwiftUI 에서 State와 Binidng을 이용하 화면 변경하기 기본 코드 struct Book { let title: String let author: String } struct bookReading: View { let book = Book(title: "Apple", author: "Happy virus") @State var isReading = false var body: some View { VStack { Text(self.book.title) .font(.title) .foregroundColor(self.isReading ? .blue: .white) Text(self.book.author) .font(.footnote) .foregroundColor(.secondary) readingButton(isReading: $isReading) } .pad.. 2023. 1. 7. 이전 1 2 3 4 5 6 7 ··· 18 다음