File tree Expand file tree Collapse file tree 12 files changed +28
-13
lines changed
main/java/com/baeldung/maxhttpheadersize Expand file tree Collapse file tree 12 files changed +28
-13
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ This module contains articles about administering a Spring Boot runtime
4
4
5
5
### Relevant Articles:
6
6
- [ Configure the Heap Size When Starting a Spring Boot Application] ( https://www.baeldung.com/spring-boot-heap-size )
7
- - [ Max-Http-Request-Header-Size in Spring Boot] ( https://www.baeldung.com/spring-boot-max-http-header-size )
8
7
- [ Programmatically Restarting a Spring Boot Application] ( https://www.baeldung.com/java-restart-spring-boot-app )
8
+ - [ Project Configuration with Spring] ( https://www.baeldung.com/project-configuration-with-spring )
9
+ - [ Spring Boot Embedded Tomcat Logs] ( https://www.baeldung.com/spring-boot-embedded-tomcat-logs )
10
+ - [ Logging HTTP Requests with Spring Boot Actuator HTTP Tracing] ( https://www.baeldung.com/spring-boot-actuator-http )
9
11
10
12
- More articles: [[ <-- prev]] ( ../spring-boot-runtime )
Original file line number Diff line number Diff line change 1
- package com .baeldung .spring . boot . management . trace ;
1
+ package com .baeldung .trace ;
2
2
3
3
import org .springframework .boot .SpringApplication ;
4
4
import org .springframework .boot .autoconfigure .SpringBootApplication ;
Original file line number Diff line number Diff line change 1
- package com .baeldung .spring . boot . management . trace ;
1
+ package com .baeldung .trace ;
2
2
3
3
import java .util .Collections ;
4
4
import java .util .List ;
5
5
import java .util .concurrent .atomic .AtomicReference ;
6
6
7
- import org .apache .hc .client5 .http .classic .methods .HttpTrace ;
8
7
import org .springframework .boot .actuate .web .exchanges .HttpExchange ;
9
8
import org .springframework .boot .actuate .web .exchanges .HttpExchangeRepository ;
10
9
import org .springframework .stereotype .Repository ;
Original file line number Diff line number Diff line change 1
- package com .baeldung .spring . boot . management . trace ;
1
+ package com .baeldung .trace ;
2
2
3
3
import org .springframework .web .bind .annotation .GetMapping ;
4
4
import org .springframework .web .bind .annotation .RequestParam ;
Original file line number Diff line number Diff line change 1
- package com .baeldung .spring .boot .management .trace ;
2
-
3
- import jakarta .servlet .ServletException ;
4
- import jakarta .servlet .http .HttpServletRequest ;
1
+ package com .baeldung .trace ;
5
2
6
3
import org .springframework .boot .actuate .web .exchanges .HttpExchangeRepository ;
7
4
import org .springframework .boot .actuate .web .exchanges .Include ;
8
5
import org .springframework .boot .actuate .web .exchanges .servlet .HttpExchangesFilter ;
9
6
import org .springframework .stereotype .Component ;
10
7
8
+ import jakarta .servlet .ServletException ;
9
+ import jakarta .servlet .http .HttpServletRequest ;
10
+
11
11
@ Component
12
12
public class TraceRequestFilter extends HttpExchangesFilter {
13
13
/**
Original file line number Diff line number Diff line change @@ -4,4 +4,20 @@ management.metrics.enable.jvm=true
4
4
management.endpoint.restart.enabled =true
5
5
spring.datasource.jmx-enabled =false
6
6
spring.jmx.enabled =true
7
- management.endpoint.shutdown.enabled =true
7
+ management.endpoint.shutdown.enabled =true
8
+
9
+ # # Access logs configuration
10
+ server.tomcat.accesslog.enabled =true
11
+ server.tomcat.accesslog.directory =logs
12
+ server.tomcat.accesslog.file-date-format =yyyy-MM-dd
13
+ server.tomcat.accesslog.prefix =access_log
14
+ server.tomcat.accesslog.suffix =.log
15
+ server.tomcat.accesslog.pattern =common
16
+ server.tomcat.basedir =tomcat
17
+
18
+ # # Tomcat internal server logs
19
+ logging.level.org.apache.tomcat =DEBUG
20
+ logging.level.org.apache.catalina =DEBUG
21
+
22
+ # # Trace app
23
+ management.trace.http.include =RESPONSE_HEADERS
Original file line number Diff line number Diff line change @@ -4,11 +4,9 @@ This module contains articles about administering a Spring Boot runtime
4
4
5
5
### Relevant Articles:
6
6
- [ Shutdown a Spring Boot Application] ( https://www.baeldung.com/spring-boot-shutdown )
7
- - [ Logging HTTP Requests with Spring Boot Actuator HTTP Tracing] ( https://www.baeldung.com/spring-boot-actuator-http )
8
- - [ Spring Boot Embedded Tomcat Logs] ( https://www.baeldung.com/spring-boot-embedded-tomcat-logs )
9
- - [ Project Configuration with Spring] ( https://www.baeldung.com/project-configuration-with-spring )
10
7
- [ Spring – Log Incoming Requests] ( https://www.baeldung.com/spring-http-logging )
11
8
- [ How to Configure Spring Boot Tomcat] ( https://www.baeldung.com/spring-boot-configure-tomcat )
12
9
- [ CORS with Spring] ( https://www.baeldung.com/spring-cors )
10
+ - [ Max-Http-Request-Header-Size in Spring Boot] ( https://www.baeldung.com/spring-boot-max-http-header-size )
13
11
14
12
- More articles: [[ more -->]] ( ../spring-boot-runtime-2 )
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments