생존기 전체 채널 4

자바 기초 문법 정리 1

public class main { public static void main(String[] args) { int x = 30; System.out.println(35); System.out.println(35 +30); x= 40; final int y = 30; y = 20 } } 변수 = 30 값이 변할 수 있음 상수(final) 값이 변하지 않음 → 아래의 y는 에러를 일으킴 데이터 타입 int x = 30; long l = 30L; short s = 30; byte b = 30; 일반적으로 int와 Long을 씀 Long 뒤에는 L int : -2147483648 ~ 2147483647 long : -9223372036854775808 ~ 9223372036854775807 -> QA할때 써야..

코딩/BE 2022.09.05

DBMS 사용 시 application.properties 설정

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://127.0.0.1:3306/?user=root spring.datasource.username=root spring.datasource.password=0000 spring.jpa.show-sql=true DBMS(Mysql, MariaDB...) 사용 시 application.properties 설정을 위와 같이 하면 오류가 발생한다. 문제점은 spring.datasource.url=jdbc:mysql://127.0.0.1:3306/?user=root 해당 줄에 있다. DBMS는 테이블이 여러개이기 때문에 테이블에 직접 꼽아줘야 한다..

코딩/BE 2022.09.01