Polish hazelcast-spring sample
* Add author for Mark Anderson created classes * Add Apache License * Add jsp-api dependency Issue gh-274
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
springSecurityVersion=4.0.0.RELEASE
|
springSecurityVersion=4.0.0.RELEASE
|
||||||
junitVersion=4.11
|
junitVersion=4.11
|
||||||
jstlVersion=1.2.1
|
jstlVersion=1.2.1
|
||||||
|
jspApiVersion=2.0
|
||||||
jedisVersion=2.5.2
|
jedisVersion=2.5.2
|
||||||
springVersion=4.1.6.RELEASE
|
springVersion=4.1.6.RELEASE
|
||||||
groovyVersion=2.3.11
|
groovyVersion=2.3.11
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ dependencies {
|
|||||||
"com.hazelcast:hazelcast-client:$hazelcastVersion",
|
"com.hazelcast:hazelcast-client:$hazelcastVersion",
|
||||||
jstlDependencies
|
jstlDependencies
|
||||||
|
|
||||||
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
|
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion",
|
||||||
|
"javax.servlet:jsp-api:$jspApiVersion"
|
||||||
|
|
||||||
testCompile "junit:junit:$junitVersion"
|
testCompile "junit:junit:$junitVersion"
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import spock.lang.Stepwise
|
|||||||
* @author Rob Winch
|
* @author Rob Winch
|
||||||
*/
|
*/
|
||||||
@Stepwise
|
@Stepwise
|
||||||
class SecurityTests extends GebReportingSpec {
|
class HazelcastSpringTests extends GebReportingSpec {
|
||||||
|
|
||||||
def 'Unauthenticated user sent to log in page'() {
|
def 'Unauthenticated user sent to log in page'() {
|
||||||
when: 'unauthenticated user request protected page'
|
when: 'unauthenticated user request protected page'
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package sample;
|
package sample;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2015 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
package sample;
|
package sample;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionCreatedEvent;
|
|||||||
import com.hazelcast.core.EntryEvent;
|
import com.hazelcast.core.EntryEvent;
|
||||||
import com.hazelcast.map.listener.EntryAddedListener;
|
import com.hazelcast.map.listener.EntryAddedListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Mark Anderson
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class SessionCreatedListener
|
public class SessionCreatedListener
|
||||||
implements EntryAddedListener<String, ExpiringSession> {
|
implements EntryAddedListener<String, ExpiringSession> {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2015 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
package sample;
|
package sample;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionExpiredEvent;
|
|||||||
import com.hazelcast.core.EntryEvent;
|
import com.hazelcast.core.EntryEvent;
|
||||||
import com.hazelcast.map.listener.EntryEvictedListener;
|
import com.hazelcast.map.listener.EntryEvictedListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Mark Anderson
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class SessionEvictedListener
|
public class SessionEvictedListener
|
||||||
implements EntryEvictedListener<String, ExpiringSession> {
|
implements EntryEvictedListener<String, ExpiringSession> {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,18 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2002-2015 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
package sample;
|
package sample;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionDeletedEvent;
|
|||||||
import com.hazelcast.core.EntryEvent;
|
import com.hazelcast.core.EntryEvent;
|
||||||
import com.hazelcast.map.listener.EntryRemovedListener;
|
import com.hazelcast.map.listener.EntryRemovedListener;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Mark Anderson
|
||||||
|
*
|
||||||
|
*/
|
||||||
public class SessionRemovedListener
|
public class SessionRemovedListener
|
||||||
implements EntryRemovedListener<String, ExpiringSession> {
|
implements EntryRemovedListener<String, ExpiringSession> {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user