-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from potenday-project/release
자동 배포 환경 구축을 위한 PR
- Loading branch information
Showing
75 changed files
with
1,760 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ public static void main(String[] args) { | |
SpringApplication.run(PromiseMeApplication.class, args); | ||
} | ||
|
||
|
||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/mvc/promiseme/calendar/controller/CalendarController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package mvc.promiseme.calendar.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import mvc.promiseme.calendar.dto.CalendarResponseDTO; | ||
import mvc.promiseme.calendar.service.CalendarService; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.util.List; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/calendar") | ||
public class CalendarController { | ||
private final CalendarService calendarService; | ||
|
||
// @GetMapping("/") | ||
// public ResponseEntity<List<CalendarResponseDTO>>calendarAll(@RequestParam Long projectId){ | ||
// return ResponseEntity.ok(calendarService.calendarAll(projectId)); | ||
// | ||
// } | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/mvc/promiseme/calendar/dto/CalendarResponseDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package mvc.promiseme.calendar.dto; | ||
|
||
import lombok.*; | ||
|
||
import java.time.LocalDate; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@Builder | ||
public class CalendarResponseDTO { | ||
private String content; | ||
private LocalDate startDate; | ||
private LocalDate finishDate; | ||
private String nickname; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/main/java/mvc/promiseme/calendar/repository/CalendarRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package mvc.promiseme.calendar.repository; | ||
|
||
import mvc.promiseme.calendar.dto.CalendarResponseDTO; | ||
import mvc.promiseme.calendar.entity.Calendar; | ||
import mvc.promiseme.project.entity.Project; | ||
import org.springframework.data.jpa.repository.JpaRepository; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import java.util.List; | ||
|
||
public interface CalendarRepository extends JpaRepository<Calendar, Long> { | ||
// @Query("SELECT NEW mvc.promiseme.calendar.dto.CalendarResponseDTO(c.content, c.startDate, c.finishDate, u.nickname) from Calendar c join c.member m join m.users u where c.project = :project") | ||
// List<CalendarResponseDTO> findByProject(Project project); | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/mvc/promiseme/calendar/service/CalendarService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package mvc.promiseme.calendar.service; | ||
|
||
import mvc.promiseme.calendar.dto.CalendarResponseDTO; | ||
|
||
import java.util.List; | ||
|
||
public interface CalendarService { | ||
|
||
//public List<CalendarResponseDTO>calendarAll(Long projectId); | ||
} |
20 changes: 20 additions & 0 deletions
20
src/main/java/mvc/promiseme/calendar/service/CalendarServiceImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package mvc.promiseme.calendar.service; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import mvc.promiseme.calendar.dto.CalendarResponseDTO; | ||
import mvc.promiseme.calendar.repository.CalendarRepository; | ||
import mvc.promiseme.project.entity.Project; | ||
import org.springframework.stereotype.Service; | ||
|
||
import java.util.List; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class CalendarServiceImpl implements CalendarService{ | ||
private final CalendarRepository calendarRepository; | ||
// @Override | ||
// public List<CalendarResponseDTO> calendarAll(Long projectId) { | ||
// Project project = Project.builder().projectId(projectId).build(); | ||
// return calendarRepository.findByProject(project); | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package mvc.promiseme.common; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class NaverKey { | ||
|
||
@Value("${ACCESS_KEY_ID}") | ||
private String accessKey; | ||
@Value("${KEY}") | ||
private String key; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package mvc.promiseme.common; | ||
|
||
public class NaverObjectStrage { | ||
public static final String BUCKET_NAME = "promise-me"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package mvc.promiseme.common.exception; | ||
|
||
public interface EnumModel { | ||
String getKey(); | ||
String getValue(); | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/mvc/promiseme/common/exception/ErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package mvc.promiseme.common.exception; | ||
|
||
|
||
import com.fasterxml.jackson.annotation.JsonFormat; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
@RequiredArgsConstructor | ||
@Getter | ||
@JsonFormat | ||
public enum ErrorCode implements EnumModel{ | ||
|
||
//예시 | ||
//회원 로그인 시 발생 가능 예외 | ||
INVALID_User_Login(401, "U001", "존재하지 않는 고객 정보입니다."), | ||
INVALID_User_Password(401, "U002", "비밀번호가 일치하지 않습니다."), | ||
|
||
//중복여부 체크 | ||
DUPLICATE_USER(400,"D001","중복된 이메일입니다."); | ||
|
||
|
||
private int status; | ||
private String code; | ||
private String message; | ||
|
||
ErrorCode(int status, String code, String message){ | ||
this.status = status; | ||
this.code = code; | ||
this.message = message; | ||
|
||
} | ||
@Override | ||
public String getKey() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public String getValue() { | ||
return null; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/mvc/promiseme/common/exception/ErrorResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package mvc.promiseme.common.exception; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class ErrorResponse { | ||
|
||
private String message; | ||
private String code; | ||
private int status; | ||
|
||
public ErrorResponse(ErrorCode code){ | ||
this.message = code.getMessage(); | ||
this.code = code.getCode(); | ||
this.status = code.getStatus(); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/mvc/promiseme/common/exception/UserException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package mvc.promiseme.common.exception; | ||
|
||
public class UserException extends RuntimeException{ | ||
private final ErrorCode errorCode; | ||
|
||
public UserException(ErrorCode errorCode){ | ||
super(errorCode.getMessage()); | ||
this.errorCode = errorCode; | ||
} | ||
|
||
public ErrorCode getErrorCode(){ | ||
return errorCode; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package mvc.promiseme.config; | ||
|
||
|
||
import com.querydsl.jpa.impl.JPAQueryFactory; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import javax.persistence.EntityManager; | ||
import javax.persistence.PersistenceContext; | ||
@Configuration | ||
public class AppConfig { | ||
|
||
@PersistenceContext | ||
private EntityManager entityManager; | ||
|
||
@Bean | ||
public JPAQueryFactory queryFactory(){ | ||
return new JPAQueryFactory(entityManager); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package mvc.promiseme.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.CorsRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class WebConfig implements WebMvcConfigurer { | ||
|
||
@Override | ||
public void addCorsMappings(CorsRegistry corsRegistry) { | ||
|
||
//http://localhost:3000로 들어오는 모든 CORS 허용 | ||
corsRegistry.addMapping("/**") | ||
.allowedOrigins("*"); | ||
|
||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
src/main/java/mvc/promiseme/meeting/controller/MeetingController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package mvc.promiseme.meeting.controller; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import mvc.promiseme.meeting.dto.MeetingResponseDTO; | ||
import mvc.promiseme.meeting.service.MeetingService; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
import org.springframework.web.multipart.MultipartFile; | ||
|
||
import java.util.List; | ||
|
||
@Slf4j | ||
@RestController | ||
@CrossOrigin(origins ="*", allowedHeaders = "*") | ||
@RequestMapping("/meeting") | ||
@RequiredArgsConstructor | ||
public class MeetingController { | ||
|
||
private final MeetingService meetingService; | ||
|
||
@GetMapping("/") | ||
public ResponseEntity<List<MeetingResponseDTO>> meetingAll(@RequestParam(name="projectId") Long projectId){ | ||
return ResponseEntity.ok(meetingService.meetingAll(projectId)); | ||
} | ||
|
||
@PostMapping("/transfer") | ||
public ResponseEntity<String> transferVoice(@RequestParam("voiceFile") MultipartFile multipartFile, @RequestParam("projectId") Long projectId){ | ||
return ResponseEntity.ok(meetingService.voiceToMeeting(multipartFile, projectId)); | ||
} | ||
|
||
@PostMapping("/summary") | ||
public ResponseEntity<String> summaryText(@RequestParam("meetingContent") String meetingContent, @RequestParam("projectId") Long projectId){ | ||
return ResponseEntity.ok(meetingService.textToMeeting(meetingContent, projectId)); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/mvc/promiseme/meeting/dto/ClovaSpeechRequestDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package mvc.promiseme.meeting.dto; | ||
|
||
import lombok.*; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@Builder | ||
public class ClovaSpeechRequestDTO { | ||
private String language; | ||
private String callback; | ||
} |
18 changes: 18 additions & 0 deletions
18
src/main/java/mvc/promiseme/meeting/dto/MeetingResponseDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package mvc.promiseme.meeting.dto; | ||
|
||
import lombok.*; | ||
|
||
import java.time.LocalDate; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Getter | ||
@Setter | ||
@Builder | ||
public class MeetingResponseDTO { | ||
private Long meetingId; | ||
private String summary; | ||
private String meetingContent; | ||
private LocalDate meetingDate; | ||
private String meetingName; | ||
} |
Oops, something went wrong.