Added checkstyle
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2019 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.cloudfoundry.environment;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2019 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.cloudfoundry.session;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
@@ -33,4 +34,4 @@ import org.springframework.context.annotation.Import;
|
||||
@Import(StickyFilterConfiguration.class)
|
||||
public @interface EnableStickyFilter {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2014 the original author or authors.
|
||||
* Copyright 2013-2019 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.cloud.cloudfoundry.session;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -52,7 +53,8 @@ public class StickyFilterConfiguration {
|
||||
HttpServletResponse response, FilterChain filterChain)
|
||||
throws ServletException, IOException {
|
||||
if (!response.containsHeader("Set-Cookie")) {
|
||||
response.addCookie(new Cookie("JSESSIONID", cookie));
|
||||
response.addCookie(new Cookie("JSESSIONID",
|
||||
StickyFilterConfiguration.this.cookie));
|
||||
}
|
||||
filterChain.doFilter(request, response);
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
spring.cloud.cloudfoundry.web.cookie=${random}
|
||||
eureka.instance.metadata-map.cookie=${spring.cloud.cloudfoundry.web.cookie}
|
||||
eureka.instance.metadata-map.cookie=${spring.cloud.cloudfoundry.web.cookie}
|
||||
|
||||
Reference in New Issue
Block a user