File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed
spring-boot-project/spring-boot/src
main/java/org/springframework/boot/web/servlet/server
test/java/org/springframework/boot/web/servlet/server Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 23
23
24
24
import org .springframework .boot .context .properties .NestedConfigurationProperty ;
25
25
import org .springframework .boot .convert .DurationUnit ;
26
- import org .springframework .boot .web .server .Cookie ;
27
26
28
27
/**
29
28
* Session properties.
@@ -103,6 +102,15 @@ SessionStoreDirectory getSessionStoreDirectory() {
103
102
return this .sessionStoreDirectory ;
104
103
}
105
104
105
+ /**
106
+ * Session cookie properties. This class is provided only for back-compatibility
107
+ * reasons, consider using {@link org.springframework.boot.web.server.Cookie} whever
108
+ * possible.
109
+ */
110
+ public static class Cookie extends org .springframework .boot .web .server .Cookie {
111
+
112
+ }
113
+
106
114
/**
107
115
* Available session tracking modes (mirrors
108
116
* {@link jakarta.servlet.SessionTrackingMode}.
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2012-2023 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ package org .springframework .boot .web .servlet .server ;
18
+
19
+ import org .junit .jupiter .api .Test ;
20
+
21
+ import static org .assertj .core .api .Assertions .assertThat ;
22
+
23
+ /**
24
+ * Tests for {@link Session}.
25
+ *
26
+ * @author Phillip Webb
27
+ */
28
+ class SessionTests {
29
+
30
+ @ Test // gh-38589
31
+ void getCookieIsBinaryBackCompatible () throws Exception {
32
+ Class <?> returnType = Session .class .getDeclaredMethod ("getCookie" ).getReturnType ();
33
+ assertThat (returnType .getName ()).isEqualTo ("org.springframework.boot.web.servlet.server.Session$Cookie" );
34
+ }
35
+
36
+ }
You can’t perform that action at this time.
0 commit comments