File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web
spring-boot/src/main/java/org/springframework/boot/web/server Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 3131import org .springframework .boot .context .properties .ConfigurationProperties ;
3232import org .springframework .boot .context .properties .NestedConfigurationProperty ;
3333import org .springframework .boot .web .server .Compression ;
34+ import org .springframework .boot .web .server .Http2 ;
3435import org .springframework .boot .web .server .Ssl ;
3536import org .springframework .boot .web .servlet .server .Jsp ;
3637import org .springframework .util .Assert ;
5051 * @author Aurélien Leboulanger
5152 * @author Brian Clozel
5253 * @author Olivier Lamy
54+ * @author Paul Vorbach
5355 */
5456@ ConfigurationProperties (prefix = "server" , ignoreUnknownFields = true )
5557public class ServerProperties {
@@ -102,6 +104,9 @@ public class ServerProperties {
102104 @ NestedConfigurationProperty
103105 private Compression compression = new Compression ();
104106
107+ @ NestedConfigurationProperty
108+ private Http2 http2 = new Http2 ();
109+
105110 private Servlet servlet = new Servlet ();
106111
107112 private final Tomcat tomcat = new Tomcat ();
@@ -190,6 +195,14 @@ public Compression getCompression() {
190195 return this .compression ;
191196 }
192197
198+ public Http2 getHttp2 () {
199+ return http2 ;
200+ }
201+
202+ public void setHttp2 (Http2 http2 ) {
203+ this .http2 = http2 ;
204+ }
205+
193206 public Servlet getServlet () {
194207 return this .servlet ;
195208 }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2012-2017 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+ * http://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 .server ;
18+
19+ /**
20+ * Simple server-independent abstraction for configuration of HTTP/2.
21+ *
22+ * @author Paul Vorbach
23+ * @since 2.0.0
24+ */
25+ public class Http2 {
26+
27+ /**
28+ * If HTTP/2 is enabled.
29+ */
30+ private boolean enabled = false ;
31+
32+ public boolean isEnabled () {
33+ return this .enabled ;
34+ }
35+
36+ public void setEnabled (boolean enabled ) {
37+ this .enabled = enabled ;
38+ }
39+
40+ }
You can’t perform that action at this time.
0 commit comments