Skip to content

Issue 1267 fix jbp config java main#1268

Open
stokpop wants to merge 5 commits into
cloudfoundry:mainfrom
stokpop:issue-1267-fix-jbp-config-java-main
Open

Issue 1267 fix jbp config java main#1268
stokpop wants to merge 5 commits into
cloudfoundry:mainfrom
stokpop:issue-1267-fix-jbp-config-java-main

Conversation

@stokpop
Copy link
Copy Markdown
Contributor

@stokpop stokpop commented May 11, 2026

Also added some notes on why the integration test did not find the missing arguments and command line changes.

stokpop added 5 commits May 11, 2026 10:50
…ring Boot

The registry stopped at Spring Boot (highest priority) without ever calling
JavaMainContainer.Detect(). If java_main_class is set in JBP_CONFIG_JAVA_MAIN,
select Java Main unconditionally before the normal detection loop, so it can
override higher-priority containers such as Spring Boot.

Also adds Ruby parity for SERVER_PORT: when java_main_class is a Spring Boot
launcher (JarLauncher, PropertiesLauncher, WarLauncher), write SERVER_PORT=$PORT
to profile.d so the app binds to the CF-assigned port.

Example use case:
  JBP_CONFIG_JAVA_MAIN: '{java_main_class: "org.springframework.boot.loader.launch.PropertiesLauncher", arguments: "--loader.home=/home/vcap/data"}'

Updates container-java_main.md: references JBP_CONFIG_JAVA_MAIN instead of
config/java_main.yml, corrects SERVER_PORT behaviour, adds example.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant