Added checkstyle

This commit is contained in:
Marcin Grzejszczak
2019-02-05 15:21:41 +01:00
parent 7867256b90
commit 004e83b1e8
45 changed files with 848 additions and 620 deletions

View File

@@ -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;

View File

@@ -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 {
}
}

View File

@@ -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);
}

View File

@@ -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}