Move Actuator Tomcat infrastructure to spring-boot-tomcat

This commit is contained in:
Stéphane Nicoll
2025-05-23 14:01:44 +02:00
committed by Phillip Webb
parent 431210d7b2
commit 01d0906cbe
21 changed files with 24 additions and 27 deletions

View File

@@ -0,0 +1,36 @@
/*
* 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.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.boot.tomcat.actuate.autoconfigure.web;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link TomcatManagementServerProperties}.
*
* @author Andy Wilkinson
*/
class TomcatManagementServerPropertiesTests {
@Test
void accessLogsArePrefixedByDefault() {
TomcatManagementServerProperties properties = new TomcatManagementServerProperties();
assertThat(properties.getAccesslog().getPrefix()).isEqualTo("management_");
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 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.
@@ -14,13 +14,11 @@
* limitations under the License.
*/
package org.springframework.boot.actuate.metrics.web.tomcat;
package org.springframework.boot.tomcat.actuate.metrics;
import io.micrometer.core.instrument.MeterRegistry;
import org.junit.jupiter.api.Test;
import org.springframework.boot.tomcat.actuate.metrics.TomcatMetricsBinder;
import static org.mockito.Mockito.mock;
/**