Spring 16

#3 엔티티 생성 + JPA관계형DB 설계

Enum : - DeliveryStatus - OrderStatus Class : - Member - Order - OrderItem - Delivery - Address - Item ==(상속)==> Album,Book,Movie - Category 세부 내용 @Id 직접할당. 엔티티의 기본키 필드에 값을 직접 넣어 등록한다. @GeneratedValue 자동할당 속성값 설명 대표DBMS strategy = GenerationType.IDENTITY 기본키 생성을 데이터베이스에 위임. MYSQL strategy = GenerationType.SEQUENCE 시퀀스 사용, @SequenceGenerator 필요(시퀀스 생성) ORACLE strategy = GenerationType.TABLE 키 생성용..

Spring/SpringBoot 2022.04.03

#2 application.yml vs properties, SpringBoot쿼리 파라미터

application.properties를 지우고 application.yml파일 생성 application.yml 내용(띄어쓰기 주의★★★★★) spring: #spring아래 datasource: url: jdbc:h2:tcp://localhost/~/jpashop username: sa password: driver-class-name: org.h2.Driver #spring아래 jpa: hibernate: ddl-auto: create properties: hibernate: # show_sql: true format_sql: true logging.level: org.hibernate.SQL: debug # org.hibernate:type: trace h2 1.4.200 버전 다운로드 링크 윈..

Spring/SpringBoot 2022.04.03

#1 JPA 프로젝트생성, 뷰(thymeleaf), 빌드

1. start.spring.io에서 프로젝트 아래와 같이 생성 2. 라이브러리 - logback + slf4j로 로그 많이씀 - h2 데이터베이스 3. 뷰 연결(tymeleaf) 4. 다시 실행 안하고 빌드(ctrl+shift+f9)+새로고침 하면 웹페이지에 반영되는 법 5. h2설치는 아래 링크에서. 윈도우 설치판: https://h2database.com/h2-setup-2019-03-13.exe 윈도우, 리눅스, MAC: https://h2database.com/h2-2019-03-13.zip 주의! H2 데이터베이스는 꼭 1.4.199 버전을 설치해주세요. (최신버전인 1.4.200을 설치하면 오동작 할 수 있습니다.)

Spring/SpringBoot 2022.04.03

React 변수 사용법

참고링크 React에서 fun과 변수를 사용하여 숫자를 기록해보겠다. useState 메소드를 이용해서 버튼 클릭할때마다 숫자 증가 및 감소. 그리고 numRecording 메소드를 통해서 저장된 숫자 리스트를 저장. import './App.css'; import React, { useState } from 'react'; function App() { const [num, setNum] = useState(1); const [numList, setNumList] = useState([]); function numRecording(){ setNumList([...numList, num]); setNum(0); } return ( 현재 숫자 : {num} {setNum(num+1)}}>숫자 증가 {set..

Spring/SpringBoot 2022.01.28

AWS 스프링 플젝 참고링크

https://velog.io/@dohaeng0/AWS%EC%97%90-Spring-Boot-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EB%B0%B0%ED%8F%AC-1-RDS-MySQL-%EC%84%B8%ED%8C%85 AWS에 Spring Boot 프로젝트 배포 1 - RDS, MySQL 세팅 이번에는 나눠서 작성을 할 것인데 이어지는 글에서는 만든 프로젝트를 AWS 를 통해 배포 해볼 것이다.그리고 여태까지는 H2 데이터베이스를 통해 테스트용으로만 사용했지만,이제는 서버가 다 velog.io https://victorydntmd.tistory.com/338 [SpringBoot] 게시판 (5) - AWS EC2에 배포하기 (feat. AWS RDS) Springboot로 ..

Spring/SpringBoot 2022.01.10