mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
See gh-33384
This commit is contained in:
parent
39a026ed65
commit
90589fd6d4
@ -10,7 +10,7 @@ $log = Logger.new(STDOUT)
|
|||||||
$log.level = Logger::WARN
|
$log.level = Logger::WARN
|
||||||
|
|
||||||
def get_fixed_issues()
|
def get_fixed_issues()
|
||||||
$log.debug "Searching for for forward merge"
|
$log.debug "Searching for forward merge"
|
||||||
rev=`git rev-parse -q --verify MERGE_HEAD`.strip
|
rev=`git rev-parse -q --verify MERGE_HEAD`.strip
|
||||||
$log.debug "Found #{rev} from git rev-parse"
|
$log.debug "Found #{rev} from git rev-parse"
|
||||||
return nil unless rev
|
return nil unless rev
|
||||||
@ -65,7 +65,7 @@ if message_type != "merge"
|
|||||||
exit 0;
|
exit 0;
|
||||||
end
|
end
|
||||||
|
|
||||||
$log.debug "Searching for for forward merge"
|
$log.debug "Searching for forward merge"
|
||||||
fixed = get_fixed_issues()
|
fixed = get_fixed_issues()
|
||||||
rewritten_message = rewrite_message(message_file, fixed)
|
rewritten_message = rewrite_message(message_file, fixed)
|
||||||
File.write(message_file, rewritten_message)
|
File.write(message_file, rewritten_message)
|
||||||
|
@ -31,8 +31,7 @@ import org.springframework.core.env.Environment;
|
|||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link EnableAutoConfiguration Auto-configuration} for for Wavefront common
|
* {@link EnableAutoConfiguration Auto-configuration} for Wavefront common infrastructure.
|
||||||
* infrastructure.
|
|
||||||
*
|
*
|
||||||
* @author Moritz Halbritter
|
* @author Moritz Halbritter
|
||||||
* @author Glenn Oppegard
|
* @author Glenn Oppegard
|
||||||
|
@ -110,7 +110,7 @@ class LazyTracingSpanContextSupplierTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void whenCurrentSpanHasNoTraceIdThenTraceIdIsFNull() {
|
void whenCurrentSpanHasNoTraceIdThenTraceIdIsNull() {
|
||||||
Span span = mock(Span.class);
|
Span span = mock(Span.class);
|
||||||
given(this.tracer.currentSpan()).willReturn(span);
|
given(this.tracer.currentSpan()).willReturn(span);
|
||||||
TraceContext traceContext = mock(TraceContext.class);
|
TraceContext traceContext = mock(TraceContext.class);
|
||||||
|
@ -101,7 +101,8 @@ public class BackgroundPreinitializer implements ApplicationListener<SpringAppli
|
|||||||
runSafely(new ConversionServiceInitializer());
|
runSafely(new ConversionServiceInitializer());
|
||||||
runSafely(new ValidationInitializer());
|
runSafely(new ValidationInitializer());
|
||||||
if (!runSafely(new MessageConverterInitializer())) {
|
if (!runSafely(new MessageConverterInitializer())) {
|
||||||
// If the MessageConverterInitializer we still might be able to
|
// If the MessageConverterInitializer fails to run, we still might
|
||||||
|
// be able to
|
||||||
// initialize Jackson
|
// initialize Jackson
|
||||||
runSafely(new JacksonInitializer());
|
runSafely(new JacksonInitializer());
|
||||||
}
|
}
|
||||||
|
@ -768,7 +768,7 @@ By default, Spring MVC related metrics are tagged with the following information
|
|||||||
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|
||||||
|===
|
|===
|
||||||
|
|
||||||
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation` package.
|
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.observation` package.
|
||||||
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
|
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
|
||||||
|
|
||||||
|
|
||||||
@ -808,7 +808,7 @@ By default, WebFlux related metrics are tagged with the following information:
|
|||||||
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|
| The request's URI template prior to variable substitution, if possible (for example, `/api/person/\{id}`)
|
||||||
|===
|
|===
|
||||||
|
|
||||||
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.observation.reactive` package.
|
To add to the default tags, provide a `@Bean` that extends `DefaultServerRequestObservationConvention` from the `org.springframework.http.server.reactive.observation` package.
|
||||||
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
|
To replace the default tags, provide a `@Bean` that implements `ServerRequestObservationConvention`.
|
||||||
|
|
||||||
TIP: In some cases, exceptions handled in controllers and handler functions are not recorded as request metrics tags.
|
TIP: In some cases, exceptions handled in controllers and handler functions are not recorded as request metrics tags.
|
||||||
|
@ -17,7 +17,7 @@ Spring Boot ships auto-configuration for the following tracers:
|
|||||||
|
|
||||||
[[actuator.micrometer-tracing.getting-started]]
|
[[actuator.micrometer-tracing.getting-started]]
|
||||||
=== Getting Started
|
=== Getting Started
|
||||||
We need an example application that we can use to getting started with tracing.
|
We need an example application that we can use to get started with tracing.
|
||||||
For our purposes, the simple "`Hello World!`" web application that's covered in the "`<<getting-started#getting-started.first-application>>`" section will suffice.
|
For our purposes, the simple "`Hello World!`" web application that's covered in the "`<<getting-started#getting-started.first-application>>`" section will suffice.
|
||||||
We're going to use the OpenTelemetry tracer with Zipkin as trace backend.
|
We're going to use the OpenTelemetry tracer with Zipkin as trace backend.
|
||||||
|
|
||||||
@ -77,7 +77,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
|
|||||||
[[actuator.micrometer-tracing.tracer-implementations.otel-zipkin]]
|
[[actuator.micrometer-tracing.tracer-implementations.otel-zipkin]]
|
||||||
==== OpenTelemetry With Zipkin
|
==== OpenTelemetry With Zipkin
|
||||||
|
|
||||||
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bride the Micrometer Observation API to OpenTelemetry.
|
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bridge the Micrometer Observation API to OpenTelemetry.
|
||||||
* `io.opentelemetry:opentelemetry-exporter-zipkin` - which is needed to report traces to Zipkin.
|
* `io.opentelemetry:opentelemetry-exporter-zipkin` - which is needed to report traces to Zipkin.
|
||||||
|
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ All tracer implementations need the `org.springframework.boot:spring-boot-starte
|
|||||||
[[actuator.micrometer-tracing.tracer-implementations.otel-wavefront]]
|
[[actuator.micrometer-tracing.tracer-implementations.otel-wavefront]]
|
||||||
==== OpenTelemetry With Wavefront
|
==== OpenTelemetry With Wavefront
|
||||||
|
|
||||||
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bride the Micrometer Observation API to OpenTelemetry.
|
* `io.micrometer:micrometer-tracing-bridge-otel` - which is needed to bridge the Micrometer Observation API to OpenTelemetry.
|
||||||
* `io.micrometer:micrometer-tracing-reporter-wavefront` - which is needed to report traces to Wavefront.
|
* `io.micrometer:micrometer-tracing-reporter-wavefront` - which is needed to report traces to Wavefront.
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,9 +157,9 @@ include::code:MyRuntimeHints[]
|
|||||||
|
|
||||||
You can then use `@ImportRuntimeHints` on any `@Configuration` class (for example your `@SpringBootApplication` annotated application class) to activate those hints.
|
You can then use `@ImportRuntimeHints` on any `@Configuration` class (for example your `@SpringBootApplication` annotated application class) to activate those hints.
|
||||||
|
|
||||||
If you have classes which needs binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean.
|
If you have classes which need binding (mostly needed when serializing or deserializing JSON), you can use {spring-framework-docs}/core.html#aot-hints-register-reflection-for-binding[`@RegisterReflectionForBinding`] on any bean.
|
||||||
Most of the hints are automatically inferred, for example when accepting or returning data from a `@RestController` method.
|
Most of the hints are automatically inferred, for example when accepting or returning data from a `@RestController` method.
|
||||||
But when you work with `WebClient` or `RestTemplate` directly, you might need to use `RegisterReflectionForBinding`.
|
But when you work with `WebClient` or `RestTemplate` directly, you might need to use `@RegisterReflectionForBinding`.
|
||||||
|
|
||||||
[[native-image.advanced.custom-hints.testing]]
|
[[native-image.advanced.custom-hints.testing]]
|
||||||
==== Testing custom hints
|
==== Testing custom hints
|
||||||
|
@ -2,10 +2,8 @@ package org.springframework.boot.test.context
|
|||||||
|
|
||||||
import org.springframework.boot.SpringBootConfiguration
|
import org.springframework.boot.SpringBootConfiguration
|
||||||
import org.springframework.boot.runApplication
|
import org.springframework.boot.runApplication
|
||||||
import org.springframework.context.annotation.Configuration
|
|
||||||
|
|
||||||
@Configuration(proxyBeanMethods = false)
|
@SpringBootConfiguration(proxyBeanMethods = false)
|
||||||
@SpringBootConfiguration
|
|
||||||
open class KotlinApplicationWithMainThrowingException {
|
open class KotlinApplicationWithMainThrowingException {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user