Tagged articles
10 articles
Page 1 of 1
Java Backend Technology
Java Backend Technology
Jul 10, 2025 · Backend Development

Unlock Spring’s Power: Global Exception Handling, Custom Interceptors, and Thread‑Local Scopes

Explore Spring’s extensibility by mastering global exception handling with @RestControllerAdvice, creating custom MVC interceptors, accessing the container via BeanFactoryAware, importing configurations, adding startup logic, modifying BeanDefinitions, using initialization callbacks, and defining a thread‑local custom scope for per‑thread bean instances.

ApplicationRunnerCustom ScopeException Handling
0 likes · 10 min read
Unlock Spring’s Power: Global Exception Handling, Custom Interceptors, and Thread‑Local Scopes
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 16, 2024 · Backend Development

Master SpringBoot Runners: ApplicationRunner vs CommandLineRunner Explained

This guide explains how to run custom code after SpringApplication starts by implementing ApplicationRunner or CommandLineRunner, compares their method signatures and argument handling, shows execution timing, provides practical examples, and demonstrates how to control execution order with @Order or Ordered.

ApplicationRunnerCommandLineRunnerRunner
0 likes · 7 min read
Master SpringBoot Runners: ApplicationRunner vs CommandLineRunner Explained
Code Ape Tech Column
Code Ape Tech Column
Apr 17, 2024 · Backend Development

Spring Boot Startup Configuration Principles, Extension Points, and Performance Optimizations

This article explains the core principles of Spring Boot startup configuration, demonstrates how to intervene using ApplicationContextInitializer, SpringApplicationRunListener, ApplicationRunner, and CommandLineRunner, and provides practical optimization techniques to significantly reduce application launch time.

ApplicationContextInitializerApplicationRunnerBackend
0 likes · 32 min read
Spring Boot Startup Configuration Principles, Extension Points, and Performance Optimizations
Cognitive Technology Team
Cognitive Technology Team
Oct 15, 2023 · Backend Development

How to Implement Pre‑warming in the Spring Ecosystem: Extension Points and Their Execution Order

Implementing pre‑warming in Spring involves using several extension points—SmartLifecycle, ApplicationListener for ContextRefreshedEvent, InitializingBean, @PostConstruct, ApplicationRunner, and CommandLineRunner—each with specific execution timing and ordering considerations to ensure cache loading occurs before the web server starts handling traffic.

ApplicationListenerApplicationRunnerCache
0 likes · 4 min read
How to Implement Pre‑warming in the Spring Ecosystem: Extension Points and Their Execution Order
Programmer DD
Programmer DD
May 30, 2022 · Backend Development

Master Spring Boot Startup: From static blocks to @PostConstruct and Runner Interfaces

This article explains the various ways to execute code during a Spring Boot application's startup, comparing Java static blocks, constructors, @PostConstruct methods, and Spring's ApplicationRunner and CommandLineRunner interfaces, including ordering with @Order and providing sample code and execution results.

ApplicationRunnerBackend DevelopmentCommandLineRunner
0 likes · 5 min read
Master Spring Boot Startup: From static blocks to @PostConstruct and Runner Interfaces
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jun 26, 2021 · Backend Development

Master Spring Boot Startup Tasks: Runners, Config, and Command-Line Tricks

After launching a Spring Boot 2.3.9 application, you can execute custom tasks using ApplicationRunner or CommandLineRunner, access startup arguments, generate random configuration values, disable command-line properties, understand configuration file loading order, and correctly use @EnableConfigurationProperties for bean binding.

ApplicationRunnerBackend DevelopmentConfigurationProperties
0 likes · 6 min read
Master Spring Boot Startup Tasks: Runners, Config, and Command-Line Tricks
Programmer DD
Programmer DD
May 30, 2021 · Backend Development

Why CommandLineRunner Can Halt Your Spring Boot Startup—and How to Fix It

This article explains the differences between Spring Boot’s CommandLineRunner and ApplicationRunner, illustrates common pitfalls when using CommandLineRunner—such as blocking startup and causing exceptions—and shows how to run tasks in a separate thread to avoid startup failures.

ApplicationRunnerCommandLineRunnermultithreading
0 likes · 9 min read
Why CommandLineRunner Can Halt Your Spring Boot Startup—and How to Fix It
Top Architect
Top Architect
May 25, 2021 · Backend Development

Spring Boot Resource Initialization: CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener

This article explains several Spring Boot techniques for initializing resources at application startup, including CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener, and provides code examples and usage guidelines for each method.

ApplicationListenerApplicationRunnerCommandLineRunner
0 likes · 8 min read
Spring Boot Resource Initialization: CommandLineRunner, ApplicationRunner, @Order, @PostConstruct, InitializingBean, and ApplicationListener
Programmer DD
Programmer DD
Jan 4, 2020 · Backend Development

Mastering Spring Boot Startup: CommandLineRunner, ApplicationRunner, Listeners & More

This article explains the five ways Spring Boot can execute code during application startup—including CommandLineRunner, ApplicationRunner, ApplicationListener, @PostConstruct, and InitializingBean—detailing their usage, ordering, argument parsing, and best‑practice recommendations.

ApplicationListenerApplicationRunnerCommandLineRunner
0 likes · 12 min read
Mastering Spring Boot Startup: CommandLineRunner, ApplicationRunner, Listeners & More