This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
public class ChatController { | |
@MessageMapping("/chat.sendMessage") | |
@SendTo("/topic/public") | |
public ChatMessage sendMessage(@Payload ChatMessage chatMessage) { | |
return chatMessage; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSocketMessageBroker | |
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { | |
@Override | |
public void registerStompEndpoints(StompEndpointRegistry registry) { | |
registry.addEndpoint("/ws").withSockJS(); | |
} | |
@Override | |
public void configureMessageBroker(MessageBrokerRegistry registry) { | |
registry.setApplicationDestinationPrefixes("/app"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target/ | |
!.mvn/wrapper/maven-wrapper.jar | |
!**/src/main/** | |
!**/src/test/** | |
### STS ### | |
.apt_generated | |
.classpath | |
.factorypath | |
.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
security.oauth2.client.clientId=**** | |
security.oauth2.client.clientSecret=**** | |
security.oauth2.client.accessTokenUri=https://www.googleapis.com/oauth2/v4/token | |
security.oauth2.client.userAuthorizationUri=https://accounts.google.com/o/oauth2/v2/auth | |
security.oauth2.client.clientAuthenticationScheme=form | |
security.oauth2.client.scope=openid,email,profile | |
security.oauth2.resource.userInfoUri=https://www.googleapis.com/oauth2/v3/userinfo | |
security.oauth2.resource.preferTokenInfo=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE hibernate-configuration PUBLIC | |
"-//Hibernate/Hibernate Configuration DTD 3.0//EN" | |
"http://hibernate.org/dtd/hibernate-configuration-3.0.dtd"> | |
<hibernate-configuration> | |
<session-factory> | |
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property> | |
<property name="hibernate.connection.url">jdbc:mysql://localhost:5432/test_db</property> | |
<property name="hibernate.connection.username">root</property> | |
<property name="hibernate.connection.password">1234</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring.datasource.url=jdbc:postgresql://localhost:5432/springbootdb | |
spring.datasource.username=postgres | |
spring.datasource.password=1234 | |
spring.jpa.hibernate.ddl-auto=create |
NewerOlder