Last change
on this file was baf4cc4, checked in by ppaunovski <paunovskipavel@…>, 3 months ago |
split group project and individual project into two separate folders
|
-
Property mode
set to
100644
|
File size:
920 bytes
|
Line | |
---|
1 | package mk.ukim.finki.busngobackend.config
|
---|
2 |
|
---|
3 | import org.springframework.context.annotation.Configuration
|
---|
4 | import org.springframework.messaging.simp.config.MessageBrokerRegistry
|
---|
5 | import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker
|
---|
6 | import org.springframework.web.socket.config.annotation.StompEndpointRegistry
|
---|
7 | import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
|
---|
8 |
|
---|
9 | @Configuration
|
---|
10 | @EnableWebSocketMessageBroker
|
---|
11 | class WebSocketConfig : WebSocketMessageBrokerConfigurer {
|
---|
12 | override fun registerStompEndpoints(registry: StompEndpointRegistry) {
|
---|
13 | registry.addEndpoint("/ws").setAllowedOrigins("http://localhost:4200", "http://localhost:4200/").withSockJS()
|
---|
14 | }
|
---|
15 |
|
---|
16 | override fun configureMessageBroker(registry: MessageBrokerRegistry) {
|
---|
17 | registry.setApplicationDestinationPrefixes("/app")
|
---|
18 | registry.enableSimpleBroker("/topic")
|
---|
19 | }
|
---|
20 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.