Update to Spring IO version
- Update Spring Boot 1.2.3.RELEASE - Update Spring Security 4.0.0.RELEASE - Update Spring 4.1.6.RELEASE - Update Groovy 2.3.8 - Update Jackson 2.4.5 - Update Jedis 2.5.2 - Update Spring Data Redis 1.4.2 Fixes gh-126
This commit is contained in:
@@ -13,7 +13,7 @@ buildscript {
|
||||
|
||||
group = 'org.springframework.session'
|
||||
|
||||
ext.springBootVersion = '1.1.10.RELEASE'
|
||||
ext.springBootVersion = '1.2.3.RELEASE'
|
||||
ext.JAVA_GRADLE = "$rootDir/gradle/java.gradle"
|
||||
ext.MAVEN_GRADLE = "$rootDir/gradle/publish-maven.gradle"
|
||||
ext.TOMCAT_GRADLE = "$rootDir/gradle/tomcat.gradle"
|
||||
|
||||
@@ -3,13 +3,15 @@ version=1.0.1.BUILD-SNAPSHOT
|
||||
commonsPoolVersion=2.2
|
||||
embeddedRedisVersion=0.5
|
||||
gebVersion=0.10.0
|
||||
groovyVersion=2.3.8
|
||||
jacksonVersion=2.4.4
|
||||
jedisVersion=2.4.1
|
||||
groovyVersion=2.3.11
|
||||
hazelcastVersion=3.3.3
|
||||
jacksonVersion=2.4.5
|
||||
jedisVersion=2.5.2
|
||||
jstlVersion=1.2.1
|
||||
junitVersion=4.11
|
||||
seleniumVersion=2.44.0
|
||||
servletApiVersion=3.0.1
|
||||
spockVersion=0.7-groovy-2.0
|
||||
springDataRedisVersion=1.4.1.RELEASE
|
||||
springSecurityVersion=4.0.0.RC1
|
||||
springVersion=4.1.3.RELEASE
|
||||
springDataRedisVersion=1.4.2.RELEASE
|
||||
springSecurityVersion=4.0.0.RELEASE
|
||||
springVersion=4.1.6.RELEASE
|
||||
|
||||
@@ -8,12 +8,12 @@ sonarRunner {
|
||||
|
||||
dependencies {
|
||||
compile project(':spring-session'),
|
||||
"com.hazelcast:hazelcast-client:3.3.3",
|
||||
"com.hazelcast:hazelcast-client:$hazelcastVersion",
|
||||
jstlDependencies
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
@@ -17,7 +17,7 @@ dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile spockDependencies,
|
||||
'org.codehaus.groovy.modules.http-builder:http-builder:0.7'
|
||||
|
||||
@@ -16,7 +16,7 @@ dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
@@ -14,7 +14,7 @@ dependencies {
|
||||
|
||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
||||
|
||||
testCompile 'junit:junit:4.11'
|
||||
testCompile "junit:junit:$junitVersion"
|
||||
|
||||
integrationTestCompile gebDependencies
|
||||
}
|
||||
@@ -16,7 +16,6 @@
|
||||
package sample.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.simp.SimpMessageType;
|
||||
import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry;
|
||||
import org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer;
|
||||
|
||||
@@ -30,8 +29,8 @@ public class WebSocketSecurityConfig extends AbstractSecurityWebSocketMessageBro
|
||||
@Override
|
||||
protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
|
||||
messages
|
||||
.antMatchers(SimpMessageType.MESSAGE,"/queue/**","/topic/**").denyAll()
|
||||
.antMatchers(SimpMessageType.SUBSCRIBE, "/queue/**/*-user*","/topic/**/*-user*").denyAll()
|
||||
.simpMessageDestMatchers("/queue/**","/topic/**").denyAll()
|
||||
.simpSubscribeDestMatchers("/queue/**/*-user*","/topic/**/*-user*").denyAll()
|
||||
.anyMessage().authenticated();
|
||||
}
|
||||
// @formatter:on
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package sample.mvc;
|
||||
|
||||
import org.springframework.security.web.csrf.CsrfToken;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class CsrfController {
|
||||
|
||||
@RequestMapping("/csrf")
|
||||
public CsrfToken csrf(CsrfToken token) {
|
||||
return token;
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,23 @@ function ApplicationModel(stompClient) {
|
||||
self.username = ko.observable();
|
||||
self.conversation = ko.observable(new ImConversationModel(stompClient,this.username));
|
||||
self.notifications = ko.observableArray();
|
||||
self.csrfToken = ko.computed(function() {
|
||||
return JSON.parse($.ajax({
|
||||
type: 'GET',
|
||||
url: 'csrf',
|
||||
dataType: 'json',
|
||||
success: function() { },
|
||||
data: {},
|
||||
async: false
|
||||
}).responseText);
|
||||
}, this);
|
||||
|
||||
self.connect = function() {
|
||||
stompClient.connect({}, function(frame) {
|
||||
var headers = {};
|
||||
var csrf = self.csrfToken();
|
||||
var headers = {};
|
||||
headers[csrf.headerName] = csrf.token;
|
||||
stompClient.connect(headers, function(frame) {
|
||||
|
||||
console.log('Connected ' + frame);
|
||||
self.username(frame.headers['user-name']);
|
||||
@@ -43,7 +57,7 @@ function ApplicationModel(stompClient) {
|
||||
self.conversation().receiveMessage(JSON.parse(message.body));
|
||||
});
|
||||
}, function(error) {
|
||||
self.pushNotification(error)
|
||||
self.pushNotification(error)
|
||||
console.log("STOMP protocol error " + error);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ dependencies {
|
||||
integrationTestCompile "redis.clients:jedis:2.4.1",
|
||||
"org.apache.commons:commons-pool2:2.2",
|
||||
"redis.embedded:embedded-redis:$embeddedRedisVersion"
|
||||
testCompile 'junit:junit:4.11',
|
||||
testCompile "junit:junit:$junitVersion",
|
||||
'org.mockito:mockito-core:1.9.5',
|
||||
"org.springframework:spring-test:$springVersion",
|
||||
'org.easytesting:fest-assert:1.4',
|
||||
|
||||
@@ -27,7 +27,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user