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:
Rob Winch
2015-08-25 08:59:50 -05:00
parent e3414ef11e
commit 8b5469ef5c
7 changed files with 64 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
springSecurityVersion=4.0.0.RELEASE
junitVersion=4.11
jstlVersion=1.2.1
jspApiVersion=2.0
jedisVersion=2.5.2
springVersion=4.1.6.RELEASE
groovyVersion=2.3.11

View File

@@ -14,7 +14,8 @@ dependencies {
"com.hazelcast:hazelcast-client:$hazelcastVersion",
jstlDependencies
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion"
providedCompile "javax.servlet:javax.servlet-api:$servletApiVersion",
"javax.servlet:jsp-api:$jspApiVersion"
testCompile "junit:junit:$junitVersion"

View File

@@ -27,7 +27,7 @@ import spock.lang.Stepwise
* @author Rob Winch
*/
@Stepwise
class SecurityTests extends GebReportingSpec {
class HazelcastSpringTests extends GebReportingSpec {
def 'Unauthenticated user sent to log in page'() {
when: 'unauthenticated user request protected page'

View File

@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package sample;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -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;
import org.springframework.context.ApplicationEventPublisher;
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionCreatedEvent;
import com.hazelcast.core.EntryEvent;
import com.hazelcast.map.listener.EntryAddedListener;
/**
*
* @author Mark Anderson
*
*/
public class SessionCreatedListener
implements EntryAddedListener<String, ExpiringSession> {

View File

@@ -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;
import org.springframework.context.ApplicationEventPublisher;
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionExpiredEvent;
import com.hazelcast.core.EntryEvent;
import com.hazelcast.map.listener.EntryEvictedListener;
/**
*
* @author Mark Anderson
*
*/
public class SessionEvictedListener
implements EntryEvictedListener<String, ExpiringSession> {

View File

@@ -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;
import org.springframework.context.ApplicationEventPublisher;
@@ -8,6 +22,11 @@ import org.springframework.session.events.SessionDeletedEvent;
import com.hazelcast.core.EntryEvent;
import com.hazelcast.map.listener.EntryRemovedListener;
/**
*
* @author Mark Anderson
*
*/
public class SessionRemovedListener
implements EntryRemovedListener<String, ExpiringSession> {