본문 바로가기

전체 글244

Spring 기반의 DB 연동 - SpringJDBC + mysql 연동 3> SpringJDBC + mysql 연동 가. 의존성 설정        org.springframework.boot     spring-boot-starter-data-jdbc      https://mvnrepository.com/artifact/mysql/mysql-connector-java -->          mysql       mysql-connector-java       8.0.33    나. DB 연동위한 4가지 정보 설정   #application properties   spring.datasource.driver-class-name=cohttp://m.mysql.cj.jdbc.Driver  spring.datasource.url=jdbc:mysql://localhost:3306/.. 2024. 7. 2.
Spring 기반의 DB 연동 - SpringJDBC + h2 연동 13. Spring 기반의 DB 연동 1> JDBC vs SpringJDBC - sql 이용 - JDBC 보다 자바코드가 훨신 적음. (예외처리 불필요. 이유는 모두 RuntimeException 계열임)     try {     } catch (SQLException e) { // Compilechecked       // Compilechecked -> ComplieUnchecked       throw new RuntimeException(""); // ComplieUnchecked     } - JdbcTemplate 빈을 이용해서 DB 처리. 2> SpringJDBC + h2 연동 가. 의존성 설정            org.springframework.boot       spring-boot-.. 2024. 7. 2.
AOP(Aspect Oriented Programming: 관점 지향 프로그래밍) OOP (Object Oriented Programming: 객체 지향 프로그래밍) 12. AOP (Aspect Oriented Programming: 관점 지향 프로그래밍) ==> @Transactional 이 AOP 기술로 만들어짐. (성공: commit , 실패: rollback) https://docs.spring.io/spring-framework/docs/5.2.25.RELEASE/spring-framework-reference/core.html#aop1> 개념   브라우저 ----------> A서블릿 ----------> 서비스 ----------> DAO ----------> DB                       (핵심기능:필수     (핵심기능          (핵심기능     .. 2024. 7. 2.
프로파일(Profile) 11. 프로파일(Profile) https://docs.spring.io/spring-boot/docs/2.7.18/reference/htmlsingle/#features.external-config.files.profile-specific1> 개요 - 실제로 개발할 때는 개발환경, Q/A 환경, .. ,Production 환경   다양한 환경을 개발자가 선택적으로 정해서 환경을 맞출 수 있는 개념. ex>   # 개발환경   Application.java ----------> DeptServiceImpl ------------> DeptDAO -------------> H2(데이터베이스, 인메모리)   # Production환경(배포)   Application.java ----------> DeptSe.. 2024. 7. 2.