Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cd-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ jobs:
# port: ${{ secrets.PORT }}
# script: |
# cd /home/ubuntu/docker
# sudo docker-compose down spring
# sudo docker-compose stop spring
# sudo docker-compose pull spring
# sudo docker-compose up -d spring
# sudo docker-compose down spring_chat
# sudo docker-compose stop spring_chat
# sudo docker-compose pull spring_chat
# sudo docker-compose up -d spring_chat
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.example.soundlinkchat_java.domain.chat.handler;

import com.fasterxml.jackson.databind.ObjectMapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
Expand All @@ -12,6 +14,8 @@

@Aspect
@Component
@RequiredArgsConstructor
@Slf4j
public class ChatMessageHandler {

@Autowired
Expand All @@ -27,7 +31,7 @@ public void sendToKafka(JoinPoint joinPoint, ChatMessage chatMessage, Object ret
kafkaTemplate.send("chat-topic", msgJson);
}
} catch (Exception e) {
e.printStackTrace();
log.info(e.getMessage(), e);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http
.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(auth -> auth
// .requestMatchers("/api/**").permitAll()
// .requestMatchers("/swagger-ui/**").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public ResponseResult saveRequestToRedis(Long requestUserId, Long emotionRecordI
return new ResponseResult(ErrorCode.SUCCESS);
} catch (IllegalArgumentException e) {
log.info(e.getMessage());
return new ResponseResult(ErrorCode.SUCCESS, "요청은 갔지만, 상대방의 SSE가 없어 알림이 전송되지 않았습니다.");
return new ResponseResult(ErrorCode.CHAT_REQUEST_SSE_FAILED);
} catch (EmotionRecordNotFoundException e) {
return new ResponseResult(ErrorCode.FAIL_TO_FIND_EMOTION_RECORD, e.getMessage());
} catch (UserNotFoundException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public BCryptPasswordEncoder passwordEncoder() {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception{
http
.csrf(AbstractHttpConfigurer::disable)
.authorizeHttpRequests(auth -> auth
// .requestMatchers("/api/**").permitAll()
// .requestMatchers("/swagger-ui/**").permitAll()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public enum ErrorCode {
CHAT_FAILED(HttpStatus.CONFLICT,"서버 내부 에러. 중복된 레코드가 존재합니다."),
CHAT_REQUEST_FAILED(HttpStatus.CONFLICT, "채팅 요청 실패"),

CONCURRENCY_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "재시도 실패. 동시성 충돌로 인해 업데이트 할 수 없습니다." );
CONCURRENCY_ERROR(HttpStatus.INTERNAL_SERVER_ERROR, "재시도 실패. 동시성 충돌로 인해 업데이트 할 수 없습니다." ),

CHAT_REQUEST_SSE_FAILED(HttpStatus.ACCEPTED, "The other user is not online.");

private final HttpStatus status;
private final String message;
Expand Down