Skip to content

Commit 884bcf5

Browse files
committed
[FIX] 무중단 스크립트 수정
1 parent 26124ab commit 884bcf5

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

‎scripts/profile.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ function find_idle_port()
3434
then
3535
echo "8081"
3636
else
37-
echo "8080"
37+
echo "8082"
3838
fi
3939
}

‎scripts/stop.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ echo "> $IDLE_PORT 에서 구동중인 애플리케이션 pid 확인"
1212
IDLE_PID=$(lsof -ti tcp:${IDLE_PORT})
1313

1414
if [ -z ${IDLE_PID} ]
15-
then
15+
then
1616
echo "> 현재 구동중인 애플리케이션이 없으므로 종료하지 않습니다."
1717
else
1818
echo "> kill -15 $IDLE_PID"

‎src/main/java/com/example/dplus/repository/BatchInsertRepository.java‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public void artWorkImageSaveAll(List<ArtWorkImage> imgList) {
3232
artWorkImageBatchInsert(bowl);
3333
}
3434
}
35-
3635
//배치 사이즈(500)를 못채우고 나오거나, 총데이터가 505개라 5개가 남으면 남은것 인서트
3736
if (!bowl.isEmpty()) {
3837
artWorkImageBatchInsert(bowl);
@@ -53,9 +52,6 @@ public void postImageSaveAll(List<PostImage> imgList) {
5352
postImageBatchInsert(bowl);
5453
}
5554
}
56-
57-
58-
5955
public void postTagImageSaveAll(List<PostTag> tagList) {
6056
List<PostTag> bowl = new ArrayList<>();
6157
for (int i = 0; i < tagList.size(); i++) {
@@ -75,7 +71,6 @@ public void postTagImageSaveAll(List<PostTag> tagList) {
7571
private void postTagBatchInsert(List<PostTag> bowl) {
7672
jdbcTemplate.batchUpdate("insert into post_tag(`hash_tag`, `post_id`) VALUES (?, ?)",
7773
new BatchPreparedStatementSetter() {
78-
// TODO 직접 insert 하기 때문에 재설정 필요
7974
@Override
8075
public void setValues(PreparedStatement ps, int i) throws SQLException {
8176
ps.setString(1, bowl.get(i).getHashTag());
@@ -92,7 +87,7 @@ public int getBatchSize() {
9287
private void postImageBatchInsert(List<PostImage> bowl) {
9388
jdbcTemplate.batchUpdate("insert into post_image(`post_img`, `post_id`) VALUES (?, ?)",
9489
new BatchPreparedStatementSetter() {
95-
// TODO 직접 insert 하기 때문에 재설정 필요
90+
9691
@Override
9792
public void setValues(PreparedStatement ps, int i) throws SQLException {
9893
ps.setString(1, bowl.get(i).getPostImg());
@@ -108,7 +103,7 @@ public int getBatchSize() {
108103
private void artWorkImageBatchInsert(List<ArtWorkImage> bowl) {
109104
jdbcTemplate.batchUpdate("insert into art_work_image(`artwork_img`, `artwork_id`) VALUES (?, ?)",
110105
new BatchPreparedStatementSetter() {
111-
// TODO 직접 insert 하기 때문에 재설정 필요
106+
112107
@Override
113108
public void setValues(PreparedStatement ps, int i) throws SQLException {
114109
ps.setString(1, bowl.get(i).getArtworkImg());

‎src/main/java/com/example/dplus/repository/artwork/ArtWorkRepositoryImpl.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,14 @@ public List<ArtworkMain> showArtWorkLikeSort(String category, Pageable pageable)
203203

204204
@Override
205205
public List<ArtworkMain> findByFollowerArtWork(Long accountId,String category, Long lastArtWorkId) {
206-
//accountId가 팔로우한 사람 아이디들이 나옴.
206+
207207
List<Long> followingId = queryFactory
208208
.select(follow.followingId)
209209
.from(follow)
210210
.join(account).on(account.id.eq(follow.followingId))
211211
.where(follow.followerId.eq(accountId))
212212
.fetch();
213-
//현재 카테고리를 확인하고, in절을 이용해 팔로우한 아이디들의 artwork만 뽑아내기
213+
214214
return queryFactory
215215
.select(Projections.constructor(ArtworkMain.class,
216216
artWorks.id,

‎src/main/java/com/example/dplus/repository/post/PostRepository.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
import org.springframework.data.jpa.repository.JpaRepository;
55

66
public interface PostRepository extends JpaRepository<Post, Long>, PostRepositoryCustom {
7+
8+
79
}

‎src/main/java/com/example/dplus/repository/post/PostRepositoryImpl.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public List<Post> findCategoryPostOrderByCreated(Long lastPostId,String board, S
3737
// 카테고리별 좋아요순
3838
@Override
3939
public List<Post> findCategoryPostOrderByLikeDesc(Pageable pageable, String board, String category) {
40+
4041
return queryFactory
4142
.selectFrom(post)
4243
.innerJoin(post.account,account)

‎src/main/resources/application-real2.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server:
2-
port: 8080
2+
port: 8082
33

44
spring:
55
config:

0 commit comments

Comments
 (0)