Skip to content

Commit

Permalink
refactor: @Profile 명시 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
takoyakimchi committed Dec 3, 2024
1 parent 11014b4 commit aee029a
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
import com.happy.friendogly.auth.service.jwt.JwtProvider;
import java.util.List;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver;
import org.springframework.messaging.simp.config.ChannelRegistration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;

@Profile("local | dev | prod")
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketInMemoryConfig implements WebSocketMessageBrokerConfigurer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;

@Profile("rabbit")
@Profile("rabbit") // RabbitMQ가 필요한 상황에서는 해당 프로파일명을 변경해주세요.
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketRabbitMqConfig implements WebSocketMessageBrokerConfigurer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
package com.happy.friendogly.chatsocket.template;

import org.springframework.context.annotation.Profile;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.stereotype.Component;

@Component
@Profile("local | dev | prod")
public class InMemoryChatTemplate implements ChatTemplate {

private static final String TOPIC_CHAT_PREFIX = "/exchange/chat.exchange/room.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.stereotype.Component;

@Component
@Profile("rabbit")
@Profile("rabbit") // RabbitMQ가 필요한 상황에서는 해당 프로파일명을 변경해주세요.
public class RabbitChatTemplate implements ChatTemplate {

private final RabbitTemplate rabbitTemplate;
Expand Down

0 comments on commit aee029a

Please sign in to comment.