Answer the question
In order to leave comments, you need to log in
How to implement integration test for Spring Websocket?
I want to make an integration test for websocket: connect to the server-> subscribe to the mailing list-> send a message-> enter the message into the database-> get a response.
The controller has a method that receives a message and sends it to the client:
@MessageMapping("/section/add")
@SendTo("/section/add")
public Message addSection(EntitySection section){
sectionService.addSection(section);
return MessageBuilder
.withPayload("")
.setHeader(HEADER_STATUS,STATUS_OK)
.build();
}
@MessageMapping("/section/add")
is responsible for calling the method when a message is received. @SendTo("/section/add")
sends a response to the client. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question