-
Notifications
You must be signed in to change notification settings - Fork 397
Open
Labels
status/need-triageTeam needs to triage and take a first lookTeam needs to triage and take a first look
Description
Description
Spring Shell application completes startup successfully but exits immediately instead of entering interactive mode. The application context starts, all beans are created, and the application reaches ACCEPTING_TRAFFIC readiness state, but then the shutdown hook is triggered immediately.
Configuration
application.yml
spring:
application:
name: mudis
version: 0.0.1
profiles:
active: dev
shell:
interactive:
enabled: true
command:
script:
enabled: false
context:
close: false
main:
banner-mode: console
banner:
location: banner.txt
mudis:
server:
port: 8888
host: localhostMain Application Class
package io.mudis.mudis;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication(
proxyBeanMethods = false,
scanBasePackages = {
"io.mudis.mudis.client",
"io.mudis.mudis.server",
"io.mudis.mudis.command",
})
public class MudisCLI {
static void main(String... args) {
SpringApplication.run(MudisCLI.class, args);
}
}Relevant Log Sections
Successful Startup
2026-02-04T16:58:39.723+04:00 INFO 42718 --- [mudis] [ main] io.mudis.mudis.MudisCLI : Started MudisCLI in 1.642 seconds (process running for 2.027)
2026-02-04T16:58:39.726+04:00 DEBUG 42718 --- [mudis] [ main] o.s.b.a.ApplicationAvailabilityBean : Application availability state LivenessState changed to CORRECT
2026-02-04T16:58:39.730+04:00 DEBUG 42718 --- [mudis] [ main] o.s.b.a.ApplicationAvailabilityBean : Application availability state ReadinessState changed to ACCEPTING_TRAFFIC
Immediate Shutdown
2026-02-04T16:58:39.732+04:00 DEBUG 42718 --- [mudis] [ionShutdownHook] s.c.a.AnnotationConfigApplicationContext : Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@74589991, started on Wed Feb 04 16:58:38 GMT+04:00 2026
Conditional Matches (Shell Configuration)
ShellRunnerAutoConfiguration#systemShellRunner matched:
- @ConditionalOnMissingClass did not find unwanted class 'org.springframework.shell.jline.DefaultJLineShellConfiguration' (OnClassCondition)
- @ConditionalOnProperty (spring.shell.interactive.enabled=true) matched (OnPropertyCondition)
ShellRunnerAutoConfiguration#springShellApplicationRunner matched:
- @ConditionalOnMissingBean (types: org.springframework.boot.ApplicationRunner; SearchStrategy: all) did not find any beans (OnBeanCondition)
Expected Behavior
The application should:
- Complete startup
- Display the Spring Shell prompt
- Wait for user input in interactive mode
- Remain running until the user exits
Actual Behavior
The application:
- Completes startup successfully
- Immediately triggers the shutdown hook
- Exits with code 0 without entering interactive mode
Additional Context
The logs show that:
spring.shell.interactive.enabled=trueis properly configuredsystemShellRunnerbean is created successfullyspringShellApplicationRunnerbean is created successfullyconsoleInputProviderbean is created successfully- All auto-configuration conditions match correctly
However, there's a warning about Netty's sun.misc.Unsafe being unavailable on Java 25, though this appears to be handled gracefully:
2026-02-04T16:58:39.313+04:00 DEBUG 42718 --- [mudis] [ main] i.n.util.internal.PlatformDependent0 : sun.misc.Unsafe: unavailable (io.netty.noUnsafe=true by default on Java 25+)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status/need-triageTeam needs to triage and take a first lookTeam needs to triage and take a first look