02. Project 생성-UML
Unified Modeling Language => 객체들 간의 관계를 정의한 일종의 ...
구성 환경
java 8 이상, insomnia(rest client), ide 필요
spring framework(core), spring data(db 연계), test, servlet(MVC) 위주로
표현, 처리, 저장 => 모아서 정보에 모음: entities
rest client를 활용해서 서버 프로그램이 동작을 확인 => rest client
정보를 구성하고 사용자의 행위를 처리하는 class를 구성하고 => service
사용자 데이터를 저장하는 것은 => store
아래 class를 정의하고 시작
- entity : id / abstract
- travelClub: 이름, 소개, 글자수 제한
- Membership : clubid, memberid, role, joindate
- community membet : email, name, phone, birthday, nickname
- address: List
address: address type, country, street, zip, zip code
address type : home, office
UML
1. Entity class(정보에 대한 클래스)
2. class Diagram(service, store layer)
프로젝트 생성을 위한 서비스 흐름에 따른 영역 구분
프로젝트를 생성하기 위해 필요한 영역을 구분하고 개별 영역에서 사용한 기술을 정의
UI 영역 | Front Controller |
프리젠테이션 영역 Controller |
서비스 발생 영역 | 비지니스 로직 Service |
자원접근 Store (Repository) |
자원 DB |
Java Script HTML CSS React Angula Etc. |
Dispatcher | JSP/Servlet Struts2 Spring MVC |
Jersey CXF Spring MVC |
POJO | Spring JDBC MyBatis JPA |
Database MySql NoSQL File |
Spring IoC Container |
* 서비스 발행 영역은 이중화, proxy, L/B 등을 구현할 때 필요함
Maven 기반으로 프로젝트를 생성
pom.xml => propterties, dependencies 만 구성
* data class, interface를 UML을 기반으로 해봄(될지는 모름 , 안되면 봐 가면서 함...)
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myvms</groupId>
<artifactId>travelClub</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source> // java version
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>6.0.3</version>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>