mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge branch '3.1.x'
Closes gh-36878
This commit is contained in:
commit
96aa0611f6
@ -284,7 +284,7 @@ task runRemoteSpringApplicationExample(type: org.springframework.boot.build.docs
|
||||
|
||||
task runSpringApplicationExample(type: org.springframework.boot.build.docs.ApplicationRunner) {
|
||||
classpath = configurations.springApplicationExample + sourceSets.main.output
|
||||
mainClass = "org.springframework.boot.docs.features.springapplication.MyApplication"
|
||||
mainClass = "org.springframework.boot.docs.features.logexample.MyApplication"
|
||||
args = ["--server.port=0"]
|
||||
output = file("$buildDir/example-output/spring-application.txt")
|
||||
expectedLogging = "Started MyApplication in "
|
||||
@ -293,7 +293,7 @@ task runSpringApplicationExample(type: org.springframework.boot.build.docs.Appli
|
||||
|
||||
task runLoggingFormatExample(type: org.springframework.boot.build.docs.ApplicationRunner) {
|
||||
classpath = configurations.springApplicationExample + sourceSets.main.output
|
||||
mainClass = "org.springframework.boot.docs.features.springapplication.MyApplication"
|
||||
mainClass = "org.springframework.boot.docs.features.logexample.MyApplication"
|
||||
args = ["--spring.main.banner-mode=off", "--server.port=0", "--spring.application.name=myapp"]
|
||||
output = file("$buildDir/example-output/logging-format.txt")
|
||||
expectedLogging = "Started MyApplication in "
|
||||
|
@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2012-2023 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.docs.features.logexample;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* Sample application used to collect logs for the reference doc.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class MyApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MyApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user