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
2 changes: 1 addition & 1 deletion src/main/java/com/example/demo/config/WebSocketConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
stompEndpointRegistry.addEndpoint("/websocket-chat")
stompEndpointRegistry.addEndpoint("/chat")
.setAllowedOrigins("*")
.withSockJS();
}
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/com/example/demo/dto/MessageDTO.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.demo.dto;

public class MessageDTO {

private String message;

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}
4 changes: 2 additions & 2 deletions src/main/java/com/example/demo/models/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ public class Message {
Long id;
@ManyToOne
@JoinColumn(name = "profile_id")
@JsonIgnoreProperties("messages")
// @JsonIgnoreProperties("messages")
Profile profile;
String body;
Date timestamp;
@ManyToOne
@JoinColumn(name = "channel_id")
@JsonIgnoreProperties("messages")
// @JsonIgnoreProperties("messages")
Channel channel;


Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring.datasource.url=jdbc:mysql://localhost:3306/chatter_box
spring.datasource.username=zach
spring.datasource.username=root
spring.datasource.password=zipcode0
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
Expand Down
2 changes: 1 addition & 1 deletion target/classes/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
spring.datasource.url=jdbc:mysql://localhost:3306/chatter_box
spring.datasource.username=zach
spring.datasource.username=root
spring.datasource.password=zipcode0
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added target/classes/com/example/demo/dto/MessageDTO.class
Binary file not shown.
Binary file modified target/classes/com/example/demo/models/Message.class
Binary file not shown.
Binary file modified target/classes/com/example/demo/repository/MessageRepo.class
Binary file not shown.