Browse Source

Merge branch '3.4.x'

Closes gh-45948
pull/45964/head
Stéphane Nicoll 8 months ago
parent
commit
9743ee25eb
  1. 8
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java
  2. 5
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java

8
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

@ -1269,7 +1269,7 @@ public class ServerProperties { @@ -1269,7 +1269,7 @@ public class ServerProperties {
/**
* Log format.
*/
private FORMAT format = FORMAT.NCSA;
private Format format = Format.NCSA;
/**
* Custom log format, see org.eclipse.jetty.server.CustomRequestLog. If
@ -1310,11 +1310,11 @@ public class ServerProperties { @@ -1310,11 +1310,11 @@ public class ServerProperties {
this.enabled = enabled;
}
public FORMAT getFormat() {
public Format getFormat() {
return this.format;
}
public void setFormat(FORMAT format) {
public void setFormat(Format format) {
this.format = format;
}
@ -1369,7 +1369,7 @@ public class ServerProperties { @@ -1369,7 +1369,7 @@ public class ServerProperties {
/**
* Log format for Jetty access logs.
*/
public enum FORMAT {
public enum Format {
/**
* NCSA format, as defined in CustomRequestLog#NCSA_FORMAT.

5
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/embedded/JettyWebServerFactoryCustomizer.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 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.
@ -33,6 +33,7 @@ import org.eclipse.jetty.server.HttpConfiguration; @@ -33,6 +33,7 @@ import org.eclipse.jetty.server.HttpConfiguration;
import org.eclipse.jetty.server.RequestLogWriter;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.autoconfigure.web.ServerProperties.Jetty.Accesslog.Format;
import org.springframework.boot.cloud.CloudPlatform;
import org.springframework.boot.context.properties.PropertyMapper;
import org.springframework.boot.web.embedded.jetty.ConfigurableJettyWebServerFactory;
@ -201,7 +202,7 @@ public class JettyWebServerFactoryCustomizer @@ -201,7 +202,7 @@ public class JettyWebServerFactoryCustomizer
if (properties.getCustomFormat() != null) {
return properties.getCustomFormat();
}
if (ServerProperties.Jetty.Accesslog.FORMAT.EXTENDED_NCSA.equals(properties.getFormat())) {
if (Format.EXTENDED_NCSA.equals(properties.getFormat())) {
return CustomRequestLog.EXTENDED_NCSA_FORMAT;
}
return CustomRequestLog.NCSA_FORMAT;

Loading…
Cancel
Save