This commit is contained in:
jinho jeong
2022-04-20 15:09:30 +09:00
parent 6c7952fbf0
commit 60eeb36acd
5 changed files with 51 additions and 8 deletions

View File

@@ -1,12 +1,21 @@
# 오늘(ONeul) # ONeul(오늘)
하루살이 SNS One Day Lifetime SNS
## 개발 목표
- Spring Batch를 사용하여 24시간 지난 게시물 삭제 ## Development Goals
- Session을 사용한 사용자 관리 - Delete post 24 hours old using Spring Batch
- OOP가 적용된 구조 - Managing Logins Using Session
## 구조 - Object Oriented Programming
## 실행 방법 - CQRS(Command and Query Responsibility Segregation) Structure
- RESTful API
## Application Structure
### Simple CQRS
<p align="center"><img src="asset/cqrs_normal.jpeg"></p>
## How to run
```bash ```bash
git clone {github_url}
gradle bootJar gradle bootJar
java -jar build/libs/oneul-0.0.1-SNAPSHOT.jar java -jar build/libs/oneul-0.0.1-SNAPSHOT.jar
``` ```

BIN
asset/cqrs_normal.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 KiB

BIN
asset/cqrs_premium.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -22,6 +22,7 @@ repositories {
dependencies { dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools' developmentOnly 'org.springframework.boot:spring-boot-devtools'
annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok'

View File

@@ -0,0 +1,33 @@
package com.example.oneul.model;
import java.time.LocalDate;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class User {
@Id @GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String username;
private String password;
private LocalDate createdAt;
public Long getId(){
return this.id;
}
public String getUsername(){
return this.username;
}
public String getPassword(){
return this.password;
}
public LocalDate getCreatedAt(){
return this.createdAt;
}
}