Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
orieasy1 committed Nov 23, 2024
2 parents b45d0e4 + 0231677 commit 0dd018a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
22 changes: 22 additions & 0 deletions appspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 0.0
os: linux
# destination에 아티팩트가 unzip된 결과가 생성될 디렉토리명을 넣어준다.
files:
- source: /
destination: /home/ubuntu/build/
overwrite: yes
permissions:
- object: /
pattern: "**"
owner: ubuntu
group: ubuntu

hooks:
AfterInstall: #AfterInstall에서 기존에 실행중이던 어플리케이션 종료시키고 ApplicationStart에서 새로운 어플리케이션 실행
- location: scripts/stop.sh
timeout: 60
runas: ubuntu
ApplicationStart:
- location: scripts/start.sh
timeout: 60
runas: ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public OpenAPI openAPI() {
.bearerFormat("JWT"));

return new OpenAPI()
.addServersItem(new Server().url("https://ordereasy.duckdns.org"))
.addServersItem(new Server().url("http://localhost:8080"))
.components(new Components())
.info(info)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class Solution {
@Column(nullable = false)
private Long questionId;

@OneToMany(mappedBy = "submission", cascade = CascadeType.ALL, orphanRemoval = true)
@OneToMany(mappedBy = "solution", cascade = CascadeType.ALL, orphanRemoval = true)
private List<AnswerEntity> answers;

@Entity
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package com.jojoidu.book.easy.practice.repository;

import com.jojoidu.book.easy.practice.entity.Problem;
import com.jojoidu.book.easy.practice.entity.Solution;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface SolutionRepository extends JpaRepository<Solution, Long> {
Optional<List<Solution>> findByProblem(Problem problem);
}

0 comments on commit 0dd018a

Please sign in to comment.