profile
viewpoint

joshlong/the-spring-rest-stack 350

the deck to my talk on building more powerful REST APIs

odrotbohm/moduliths 265

Building modular, monolithic applications using Spring Boot

joshlong/spring-doge 55

a look at the application development tour-de-force that is Spring Boot

joshlong/javaconfig-ftw 3

Attached to a talk that Phill Webb and I will give at SpringOne2GX 2013 in Santa Clara, California ([Building Your Java Configuration Muscle Memory](https://springone2gx.com/conference/santa_clara/2013/09/springone/event_schedule)).

philwebb/artifactory-resource 1

Artifactory Concouse Resource

push eventspring-projects/spring-boot

Phillip Webb

commit sha 234c5033d4e41f634ec382eced4cffbc4f1a4b43

Polish whitespace

view details

Phillip Webb

commit sha 1eee83a07e7e3fadacec579407099b8d0216190f

Update copyright year of changed files

view details

Phillip Webb

commit sha cbacab5e265caf92a307373e73d9a5cba9da9873

Polish

view details

push time in a month

issue closedspring-projects/spring-boot

ApplicationContextRunner evaluates @Conditional on AutoConfiguration too early

Hi there,

I faced another behavioral difference between AutoConfigurationImportSelector and ApplicationContextRunner.

When @Conditional exists on auto configuration class, with ApplcicationContextRunner#withConfiguration using AutoConfigurations.of, the evaluation of Conditional happens early(at import time, not at processing auto configurations).

Here is the usecase and sudo code:

I am trying to control autoconfiguration (enable/disable) based on the annotation on user config.

// User Configuration
@Configuration
@EnableX  // this enables MyAutoConfiguration
public static class MyUserConfig {
}

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(MyImportSelector.class)
public @interface EnableX {
}

public static class MyImportSelector implements ImportSelector {
  public static boolean enabled;  // flag to enable/disable ConditionalOnX on MyAutoConfiguration

  @Override
  public String[] selectImports(AnnotationMetadata metadata) {
    enabled = true;
    return new String[0];  // return empty
  }
}
// Auto Configuration
@Configuration
@ConditionalOnX
static class MyAutoConfiguration {
  @Bean
  public String foo() {
    return "FOO";
  }
}

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Conditional(OnXCondition.class)
public @interface ConditionalOnX {
}

public static class OnXCondition extends SpringBootCondition {
  @Override
  public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
    return MyImportSelector.enabled ? ConditionOutcome.match("enabled") : ConditionOutcome.noMatch("disabled");
  }
}
@Test
void contextRunnerWithConditionOnAutoConfiguration() {
  new ApplicationContextRunner()
      .withInitializer(new ConditionEvaluationReportLoggingListener(LogLevel.INFO))
      .withConfiguration(AutoConfigurations.of(MyAutoConfiguration.class))
      .withUserConfiguration(MyUserConfig.class)
      .run(context -> {
        assertThat(context)
            .hasNotFailed()
            .hasBean("foo")
        ;
      });
}

What I am trying here is based on the static boolean variable, MyImportSelector.enabled, activated via @EnableX annotation on user's config, decides whether to apply MyAutoConfiguration controlled by @ConditionalOnX annotation.

For normal case, since AutoConfigurationImportSelector defers the import of autoconfigurations, the evaludation of @Conditional happens at deferred import time. Thus, OnXCondition evaluation is guaranteed to be performed after normal configurations processing (MyUserConfig/@EnableX).

Therefore, it evaluates MyImportSelector first (where it sets boolean flag to true) triggered by @EnableX, then OnXCondition can read the updated value as part of processing autoconfiguration classes.

On the other hand, with ApplicationContextRunner, it processes OnXCondition then MyImportSelector. This is because in AbstractApplicationContextRunner#configureContext, it simply passes all configurations to context.register. The processing order of auto configurations is guaranteed by AutoConfigurations#getOrder but since it registers all configurations together, the evaluation of @Conditional happens at beginning(not deferred).

I have added some hacky change here: https://github.com/ttddyy/spring-boot/tree/context-runner-autoconfiguration commit: https://github.com/ttddyy/spring-boot/commit/fa16383b316dc7cf49cd7bf6499678f6e91f0925

With this change, the evaluation of auto configuration classes are deferred as well as evaluation of @Conditional on auto configurations. The one missing part is identifying autoconfigurations in configurations of AbstractApplicationContextRunner since spring-boot-test module doesn't have dependency to spring-boot-autoconfiguration module where AutoConfigurations class is defined.

Relates to #17963

closed time in a month

ttddyy

issue commentspring-projects/spring-boot

ApplicationContextRunner evaluates @Conditional on AutoConfiguration too early

Closing following the discussion in https://github.com/spring-projects/spring-boot/pull/19400#issuecomment-579999264

ttddyy

comment created time in a month

issue closedspring-projects/spring-boot

Consider providing recommendation for override/replace beans usecase

Since spring-boot 2.1, bean overriding is disabled by default. I think this is very reasonable and protects from unknowns by preventing hidden bean overriding.

However, time to time, there is a need to override beans. It would be great to have the best practice/guideline for handling such use cases.

Background:

I write a library which is used by multiple service applications. The library is written on top of spring-boot and provides @Enable... annotations. Typically we create @Enable... annotations rather than creating auto configurations. This is a decision that we want to explicitly turn on/off features in service rather than auto-magically happen via auto configuration.

The issue is that sometimes services want to override some beans defined in library. If we provide auto configuration, we can use @ConditionalOn... annotations since it is guaranteed to be evaluated after all @Configuration classes are processed by AutoConfigurationImportSelector.

However, since we use @EnableX, there is no distinction for @Configuration classes whether they are from library's or from application's while processing configuration classes. Therefore, due to the component scan is not deterministic to process configuration classes, we cannot reliably use @ConditionalOnX annotations because the configuration class processing order might change.

One approach is I can write a custom import-selector that makes sure all library configurations are processed after application's configurations but before auto configurations. This could allow library configurations to use @ConditionalOn annotations. However, it is a bit of too much in custom framework and even writing a custom import-selector, we also need to @EnableAutoConfiguration equivalent to bring in the custom import-selector to be in effect on application.

We also want to avoid using @Primary defined in application configuration in order to override beans in library. This is because @Primary bean may have impact writing tests in application.

Instead, an approach I chose was using BeanFactoryPostProcessor and unregister bean definitions that I want to override.

public class UnregisterBeanDefinitionBeanFactoryPostProcessor implements BeanFactoryPostProcessor, Ordered {
  private boolean lenient = false;
  private List<String> beanNames = new ArrayList<>();  // bean names to unregister

  @Override
  public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
    BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory;
    for (String beanName : this.beanNames) {
        try {
            registry.removeBeanDefinition(beanName);
        } catch (NoSuchBeanDefinitionException e) {
            if (!this.lenient) {
                throw e;
            }
        }
    }
  }

  // ...
}

This is so far working good(with limited usage), since the post processor is called after all configurations are processed(including auto configuration) but before instantiating beans. The drawback is bean-name based injection will have a problem but typically beans are injected by type.

I have seen people use @ConditionalOn[Bean|Class] on non autoconfiguration classes(with component scan). Mostly, people don't realize the fragility of @ConditionalOnX annotations. Simply, it is working in their current environment, so that they think it is ok to use.

From library/framework development perspective, one suggestion is that spring-boot to provide a mechanism to guarantee certain configuration classes to be processed after normal configurations but before auto configurations. For example, provide a means to list up such configuration classes in spring.factories with certain key(which is pretty similar to what autoconfiguration do), then defer the configuration processing right before autoconfigurations.

Another way would be making allow-bean-definition-overriding flag to be per bean definition. Currently, this is a beanFactory level switch. However, if it is down to per bean definition level, it can fine control what beans to be overridable. (maybe too much granularity)

It's my feedback about bean overriding usecase.

It is common that people create own framework/library on top of spring/spring-boot in order to share their architecture/infrastructure to applications. So it is nice to have some level of support in spring-boot for developing library on top.

Also, it would be great if you could provide some clear guideline for bean override dos and donts, blog post, documentation, some support in framework(spring or spring-boot), etc.

Thanks,

References: https://github.com/spring-projects/spring-framework/issues/15434 https://github.com/spring-projects/spring-framework/issues/19229

closed time in a month

ttddyy

issue commentspring-projects/spring-boot

Consider providing recommendation for override/replace beans usecase

Closing following the discussion in https://github.com/spring-projects/spring-boot/pull/19400#issuecomment-579999264

ttddyy

comment created time in a month

PR closed spring-projects/spring-boot

Add DeferredImportSelector that runs before/after auto configuration for: team-attention status: waiting-for-triage

Hi,

I wrote custom DeferredImportSelectors and corresponding annotations that run before/after auto configurations for my library.

  • Import[Before|After]AutoConfigurationDeferredImportSelector: DeferedImportSelector implementation that runs before/after auto configuration
  • @Import[Before|After]AutoConfiguration: Use the above deferred selector to specify which configurations to run before/after auto configuration

The background is we have shared library on top of spring-boot and provides shared configurations. Applications will pick some of the shared configurations to enable features. Since those shared configurations are not autoconfigurations, because of our preference to explicitly enable each feature, I had some problems with configuration orders especially with @ConditionalOn[Missing]Bean. By using these DeferredImportSelectors, I have better control for my library's configurations to run after user's configurations, and then before/after auto configurations.

Sample usage are:

In library:

// Make this configuration runs after user config but before autoconfig
@Configuration(proxyBeanMethods = false)
class MyFeatureConfig {
  // @Bean to enable some feature
}

// annotation to enable my feature(config)
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@ImportBeforeAutoConfiguration(MyFeatureConfig.class)  // <=== meta annotate
@interface EnableMyFeature {
}

In application:

@EnableMyFeature
@SpringBootApplication
class Application {
}

I am going to apply these import selectors to our library. At the same time, I think this is also beneficial if exists in spring-boot itself, hence the PR here.

Thanks,

Relates to: #18228, #19343

+815 -0

1 comment

7 changed files

ttddyy

pr closed time in a month

pull request commentspring-projects/spring-boot

Add DeferredImportSelector that runs before/after auto configuration

We've been discussing this issue along with #18228 and #19343 and ultimately feel like this is adding too much complexity into Spring Boot for a quite specialized use-case.

It sounds like a lot of the problems that have been raised against Spring Boot are coming from the desire to have something behave as both an @Enable... annotation, but also a form of auto-configuration. I think it's likely that such an approach is always going to be moving against the grain of the features we provide and I it's probably worth reconsidering to see if there's another design that might work better.

My personal opinion is that if you are using @Enable annotations then you shouldn't also try to combine them with @Condition annotations. I'd think it would be better to keep to a purely configuration based approach and model your code in a similar way to Spring MVC where configuration and bean overrides need to happen in a very specific way (e.g. the WebMvcConfigurer interface or WebMvcConfigurationSupport class).

If you don't want to do that, then I'd go all in on auto-configuration and design classes that work in the same way as other auto-configurations. If you really want them to be opt-in, you could write your own @Condition that checks against something. For example, you could have an annotation that uses an ImportBeanDefinitionRegistrar to records it was processed then use a condition that checks for a recorded result (AutoConfigurationPackage works a bit like that but it's not got a condition attached to it). If you go this route, it would be better to not use @Enable... as the annotation prefix since that tends to mean something that isn't auto-configuration. Perhaps you could use something like @AllowCommonMetrics instead?

I appreciate that this probably isn't the outcome you wanted for this pull-request. Unfortunately we really need to balance changes such as this against the future maintenance costs they might incur and the signal that they send. In this case, we just feel like there's going to be a lot of additional complexity and questions raised which won't be able to answer or support.

ttddyy

comment created time in a month

issue commentspring-projects/spring-boot

Review messages used in Assert calls

Sorry for the late reply @JosejeSinohui. This one is likely to touch a lot of files so I think it's best if one of the core team take care of it since we'll need to coordinate around other work.

philwebb

comment created time in a month

issue openedspring-projects/spring-boot

Update docker documentation

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown -->

created time in a month

issue openedspring-projects/spring-boot

Add layertools jarmode support to Gradle

We need to do the equivalent of #19865 in the Gradle plugin.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 57db621b706bfea4d4ee768c18675c6bc809442c

Polish

view details

Phillip Webb

commit sha 2b83edeb278aaa0e5ef031dadf8caf94a81e3736

Fix jarmode support in unexploded jars Update `LaunchedURLClassLoader` to ensure that the `JarModeLauncher` is created in the correct classloader. Prior to this commit the launcher was created by the application classloader and did not have access to any of the required `org.springframework` classes. See gh-19848

view details

Phillip Webb

commit sha b5b4a02c6128240d46a2808dee08cfc9b12ae64d

Automatically add jarmode jars when packaging Update the `Packager` to automatically add the layertools jarmode jar when producing a layered jar. Closes gh-19865

view details

push time in a month

issue closedspring-projects/spring-boot

Automatically add jarmode jars when packaging

The layertools jar should be automatically added when creating a layered jar.

closed time in a month

philwebb

issue openedspring-projects/spring-boot

Add layertools jarmode support to Maven

We should surface the Packager option that lets you opt-out of the layertools jar.

created time in a month

issue openedspring-projects/spring-boot

Automatically add jarmode jars when packaging

The layertools jar should be automatically added when creating a layered jar.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 71ce212f7fe8e4f6c017a2191e63fee32998b463

Rename spring-boot-layertools Rename `spring-boot-layertools` to `spring-boot-jarmode-layertools`. Closes gh-19853

view details

Phillip Webb

commit sha 77bbe089b2f9e24e7e527569e840c37fc6179e42

Update copyright year of changed files

view details

push time in a month

issue closedspring-projects/spring-boot

Rename spring-boot-layertools

We should rename spring-boot-layertools to spring-boot-jarmode-layertools.

closed time in a month

philwebb

issue openedspring-projects/spring-boot

Local gradle build hangs on launch script tests

My local build seems to hang on the launch script tests. Running with --debug gives:

2020-01-22T19:36:39.301-0800 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests:intTest
2020-01-22T19:36:44.291-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:44.291-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > CentOS 6.9-a23bced6 PASSED
2020-01-22T19:36:44.292-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:44.292-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu xenial-20160914 STARTED
2020-01-22T19:36:45.571-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:45.571-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu xenial-20160914 STANDARD_OUT
2020-01-22T19:36:45.571-0800 [DEBUG] [TestEventLogger]     19:36:45.570 [Test worker] INFO  o.t.i.builder.ImageFromDockerfile - Transferred 15 MB KB to Docker daemon
2020-01-22T19:36:45.668-0800 [DEBUG] [TestEventLogger]     19:36:45.667 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-xenial-20160914:latest] - Creating container for image: spring-boot-launch-script/ubuntu-xenial-20160914:latest
2020-01-22T19:36:45.707-0800 [DEBUG] [TestEventLogger]     19:36:45.707 [Test worker] INFO  o.t.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
2020-01-22T19:36:46.133-0800 [DEBUG] [TestEventLogger]     19:36:46.132 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-xenial-20160914:latest] - Starting container with ID: a34d9bdc0d70313d952793005c91716edea7884e7800b735a04444e09b9dd957
2020-01-22T19:36:46.723-0800 [DEBUG] [TestEventLogger]     19:36:46.723 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-xenial-20160914:latest] - Container spring-boot-launch-script/ubuntu-xenial-20160914:latest is starting: a34d9bdc0d70313d952793005c91716edea7884e7800b735a04444e09b9dd957
2020-01-22T19:36:46.733-0800 [DEBUG] [TestEventLogger]     19:36:46.733 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-xenial-20160914:latest] - Container spring-boot-launch-script/ubuntu-xenial-20160914:latest started in PT2.441S
2020-01-22T19:36:51.620-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:51.620-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu xenial-20160914 PASSED
2020-01-22T19:36:51.620-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:51.620-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu trusty-20160914 STARTED
2020-01-22T19:36:52.748-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:52.748-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu trusty-20160914 STANDARD_OUT
2020-01-22T19:36:52.748-0800 [DEBUG] [TestEventLogger]     19:36:52.749 [Test worker] INFO  o.t.i.builder.ImageFromDockerfile - Transferred 15 MB KB to Docker daemon
2020-01-22T19:36:52.821-0800 [DEBUG] [TestEventLogger]     19:36:52.822 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-trusty-20160914:latest] - Creating container for image: spring-boot-launch-script/ubuntu-trusty-20160914:latest
2020-01-22T19:36:52.861-0800 [DEBUG] [TestEventLogger]     19:36:52.862 [Test worker] INFO  o.t.utility.RegistryAuthLocator - Credential helper/store (docker-credential-desktop) does not have credentials for index.docker.io
2020-01-22T19:36:52.888-0800 [LIFECYCLE] [org.gradle.cache.internal.DefaultFileLockManager] 
2020-01-22T19:36:52.888-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-01-22T19:36:52.888-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T19:36:52.888-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-01-22T19:36:52.889-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-01-22T19:36:52.889-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T19:36:52.889-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-01-22T19:36:52.793-0800 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] 
2020-01-22T19:36:52.793-0800 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] > Task :spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests:intTest
2020-01-22T19:36:53.304-0800 [DEBUG] [TestEventLogger]     19:36:53.304 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-trusty-20160914:latest] - Starting container with ID: 93cb7063b3c29e28106190c1ccb0cd3fdaa72dbb5cf0243ae76e6e66ed90a2ae
2020-01-22T19:36:53.931-0800 [DEBUG] [TestEventLogger]     19:36:53.931 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-trusty-20160914:latest] - Container spring-boot-launch-script/ubuntu-trusty-20160914:latest is starting: 93cb7063b3c29e28106190c1ccb0cd3fdaa72dbb5cf0243ae76e6e66ed90a2ae
2020-01-22T19:36:53.941-0800 [DEBUG] [TestEventLogger]     19:36:53.942 [Test worker] INFO  🐳 [spring-boot-launch-script/ubuntu-trusty-20160914:latest] - Container spring-boot-launch-script/ubuntu-trusty-20160914:latest started in PT2.321S
2020-01-22T19:36:58.925-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:58.926-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests > Ubuntu trusty-20160914 PASSED
2020-01-22T19:36:58.926-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:58.927-0800 [DEBUG] [TestEventLogger] SysVinitLaunchScriptIntegrationTests PASSED
2020-01-22T19:36:58.927-0800 [DEBUG] [TestEventLogger] 
2020-01-22T19:36:58.927-0800 [DEBUG] [TestEventLogger] Gradle Test Executor 1 PASSED
2020-01-22T19:36:58.927-0800 [LIFECYCLE] [org.gradle.api.internal.tasks.testing.worker.TestWorker] 
2020-01-22T19:36:58.927-0800 [INFO] [org.gradle.api.internal.tasks.testing.worker.TestWorker] Gradle Test Executor 1 finished executing tests.
2020-01-22T19:36:58.927-0800 [DEBUG] [org.gradle.process.internal.worker.child.ActionExecutionWorker] Completed Gradle Test Executor 1.
2020-01-22T19:37:02.897-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-01-22T19:37:02.897-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T19:37:02.897-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-01-22T19:37:02.898-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-01-22T19:37:02.898-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T19:37:02.898-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-01-22T19:37:12.887-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
....
2020-01-22T20:17:22.938-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T20:17:22.938-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
2020-01-22T20:17:22.938-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire shared lock on daemon addresses registry.
2020-01-22T20:17:22.938-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock acquired on daemon addresses registry.
2020-01-22T20:17:22.938-0800 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on daemon addresses registry.
<============-> 99% EXECUTING [50m 9s]
> IDLE
> IDLE
> IDLE
> IDLE
> :spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests:intTest > 93 tests completed, 1 skipped
> IDLE
> IDLE

jstack reports:

Full thread dump OpenJDK 64-Bit Server VM (25.232-b09 mixed mode):

"Attach Listener" #28 daemon prio=9 os_prio=31 tid=0x00007f7f8fac0800 nid=0x6303 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Forward input" #27 prio=5 os_prio=31 tid=0x00007f7fa20ca800 nid=0x9807 waiting on condition [0x0000700007a74000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000007bc263b38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at org.gradle.util.DisconnectableInputStream.read(DisconnectableInputStream.java:140)
	at org.gradle.launcher.daemon.client.InputForwarder$1.run(InputForwarder.java:78)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.lang.Thread.run(Thread.java:748)

"DisconnectableInputStream source reader" #26 daemon prio=5 os_prio=31 tid=0x00007f7fa2084800 nid=0x610b runnable [0x0000700007946000]
   java.lang.Thread.State: RUNNABLE
	at java.io.FileInputStream.readBytes(Native Method)
	at java.io.FileInputStream.read(FileInputStream.java:255)
	at java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
	- locked <0x00000007bc0f6bd8> (a java.io.BufferedInputStream)
	at org.gradle.util.DisconnectableInputStream$1.run(DisconnectableInputStream.java:98)
	at java.lang.Thread.run(Thread.java:748)

"process reaper" #22 daemon prio=10 os_prio=31 tid=0x00007f7fa0952800 nid=0x9603 runnable [0x0000700007971000]
   java.lang.Thread.State: RUNNABLE
	at java.lang.UNIXProcess.waitForProcessExit(Native Method)
	at java.lang.UNIXProcess.lambda$initStreams$3(UNIXProcess.java:289)
	at java.lang.UNIXProcess$$Lambda$11/1834224344.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

"pool-1-thread-1" #20 prio=5 os_prio=31 tid=0x00007f7f4f9d3800 nid=0x9903 waiting on condition [0x0000700007843000]
   java.lang.Thread.State: TIMED_WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00000007bc1352a8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
	at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

"Service Thread" #17 daemon prio=9 os_prio=31 tid=0x00007f7f6f809800 nid=0x5e03 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread11" #16 daemon prio=9 os_prio=31 tid=0x00007f7fa0016800 nid=0x9d03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread10" #15 daemon prio=9 os_prio=31 tid=0x00007f7fa1004800 nid=0x5c03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread9" #14 daemon prio=9 os_prio=31 tid=0x00007f7fa0812000 nid=0x9f03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread8" #13 daemon prio=9 os_prio=31 tid=0x00007f7f58800000 nid=0xa103 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread7" #12 daemon prio=9 os_prio=31 tid=0x00007f7f8f83e000 nid=0x5a03 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread6" #11 daemon prio=9 os_prio=31 tid=0x00007f7fa0000000 nid=0x5803 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread5" #10 daemon prio=9 os_prio=31 tid=0x00007f7f6f809000 nid=0xa303 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread4" #9 daemon prio=9 os_prio=31 tid=0x00007f7f6f808000 nid=0xa503 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread3" #8 daemon prio=9 os_prio=31 tid=0x00007f7f6f807800 nid=0x5703 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=31 tid=0x00007f7f8f82d000 nid=0xa803 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=31 tid=0x00007f7f8f82c800 nid=0xa903 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=31 tid=0x00007f7f6f806000 nid=0x3603 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=31 tid=0x00007f7f6f805800 nid=0x3803 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=31 tid=0x00007f7fa0811000 nid=0x4303 in Object.wait() [0x000070000670d000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000007bc0f7588> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:144)
	- locked <0x00000007bc0f7588> (a java.lang.ref.ReferenceQueue$Lock)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:165)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:216)

"Reference Handler" #2 daemon prio=10 os_prio=31 tid=0x00007f7fa080b000 nid=0x4403 in Object.wait() [0x000070000660a000]
   java.lang.Thread.State: WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x00000007bc14b9b8> (a java.lang.ref.Reference$Lock)
	at java.lang.Object.wait(Object.java:502)
	at java.lang.ref.Reference.tryHandlePending(Reference.java:191)
	- locked <0x00000007bc14b9b8> (a java.lang.ref.Reference$Lock)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)

"main" #1 prio=5 os_prio=31 tid=0x00007f7fa2000800 nid=0x2603 runnable [0x00007000056db000]
   java.lang.Thread.State: RUNNABLE
	at sun.nio.ch.KQueueArrayWrapper.kevent0(Native Method)
	at sun.nio.ch.KQueueArrayWrapper.poll(KQueueArrayWrapper.java:198)
	at sun.nio.ch.KQueueSelectorImpl.doSelect(KQueueSelectorImpl.java:117)
	at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
	- locked <0x00000007bc23b330> (a sun.nio.ch.Util$3)
	- locked <0x00000007bc23b320> (a java.util.Collections$UnmodifiableSet)
	- locked <0x00000007bc23b110> (a sun.nio.ch.KQueueSelectorImpl)
	at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
	at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:101)
	at org.gradle.internal.remote.internal.inet.SocketConnection$SocketInputStream.read(SocketConnection.java:185)
	at com.esotericsoftware.kryo.io.Input.fill(Input.java:146)
	at com.esotericsoftware.kryo.io.Input.require(Input.java:178)
	at com.esotericsoftware.kryo.io.Input.readVarInt(Input.java:355)
	at com.esotericsoftware.kryo.io.Input.readInt(Input.java:350)
	at org.gradle.internal.serialize.kryo.KryoBackedDecoder.readSmallInt(KryoBackedDecoder.java:126)
	at org.gradle.internal.serialize.DefaultSerializerRegistry$TaggedTypeSerializer.read(DefaultSerializerRegistry.java:141)
	at org.gradle.internal.serialize.Serializers$StatefulSerializerAdapter$1.read(Serializers.java:36)
	at org.gradle.internal.remote.internal.inet.SocketConnection.receive(SocketConnection.java:81)
	at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(DaemonClientConnection.java:77)
	at org.gradle.launcher.daemon.client.DaemonClientConnection.receive(DaemonClientConnection.java:35)
	at org.gradle.launcher.daemon.client.DaemonClient.monitorBuild(DaemonClient.java:211)
	at org.gradle.launcher.daemon.client.DaemonClient.executeBuild(DaemonClient.java:180)
	at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:55)
	at org.gradle.launcher.daemon.client.SingleUseDaemonClient.execute(SingleUseDaemonClient.java:38)
	at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:56)
	at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:212)
	at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:404)
	at org.gradle.launcher.cli.DefaultCommandLineActionFactory$ParseAndBuildAction.execute(DefaultCommandLineActionFactory.java:376)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:38)
	at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:23)
	at org.gradle.launcher.cli.DefaultCommandLineActionFactory$WithLogging.execute(DefaultCommandLineActionFactory.java:369)
	at org.gradle.launcher.Main.doAction(Main.java:35)
	at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
	at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
	at org.gradle.launcher.GradleMain.main(GradleMain.java:31)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:35)
	at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108)
	at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

"VM Thread" os_prio=31 tid=0x00007f7fa080a000 nid=0x4603 runnable 

"GC task thread#0 (ParallelGC)" os_prio=31 tid=0x00007f7fa200d800 nid=0x2107 runnable 

"GC task thread#1 (ParallelGC)" os_prio=31 tid=0x00007f7fa200e000 nid=0x1f03 runnable 

"GC task thread#2 (ParallelGC)" os_prio=31 tid=0x00007f7fa0800800 nid=0x1d03 runnable 

"GC task thread#3 (ParallelGC)" os_prio=31 tid=0x00007f7fa0801000 nid=0x5403 runnable 

"GC task thread#4 (ParallelGC)" os_prio=31 tid=0x00007f7fa0801800 nid=0x2b03 runnable 

"GC task thread#5 (ParallelGC)" os_prio=31 tid=0x00007f7fa0805000 nid=0x5103 runnable 

"GC task thread#6 (ParallelGC)" os_prio=31 tid=0x00007f7fa0805800 nid=0x5003 runnable 

"GC task thread#7 (ParallelGC)" os_prio=31 tid=0x00007f7fa200e800 nid=0x4e03 runnable 

"GC task thread#8 (ParallelGC)" os_prio=31 tid=0x00007f7fa1005800 nid=0x4d03 runnable 

"GC task thread#9 (ParallelGC)" os_prio=31 tid=0x00007f7fa1006000 nid=0x4b03 runnable 

"GC task thread#10 (ParallelGC)" os_prio=31 tid=0x00007f7fa1007000 nid=0x4903 runnable 

"GC task thread#11 (ParallelGC)" os_prio=31 tid=0x00007f7fa1007800 nid=0x4703 runnable 

"GC task thread#12 (ParallelGC)" os_prio=31 tid=0x00007f7fa1008000 nid=0x2f03 runnable 

"VM Periodic Task Thread" os_prio=31 tid=0x00007f7f6f804800 nid=0x9a03 waiting on condition 

JNI global references: 243

created time in a month

issue closedspring-projects/spring-boot

Fix EmbeddedServletContainerJarPackagingIntegrationTests

Hi,

the current builds are failing in EmbeddedServletContainerJarPackagingIntegrationTests. Unfortunately, I can't take care of it myself at the moment. Apparently, there has been a force-push to master that screwed things badly for me.

Here's a local stacktrace though.

Exception in thread "main" java.lang.reflect.InvocationTargetException
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:112)
	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:93)
Caused by: java.lang.LinkageError: loader org.springframework.boot.loader.ExplodedURLClassLoader @3a71f4dd attempted duplicate class definition for org.springframework.boot.builder.SpringApplicationBuilder. (org.springframework.boot.builder.SpringApplicationBuilder is in unnamed module of loader org.springframework.boot.loader.ExplodedURLClassLoader @3a71f4dd, parent loader 'app')
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:515)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:423)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:417)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:416)
	at org.springframework.boot.loader.ExplodedURLClassLoader.loadClass(ExplodedURLClassLoader.java:36)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at ch.qos.logback.classic.spi.PackagingDataCalculator.loadClass(PackagingDataCalculator.java:204)
	at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:228)
	at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:135)
	at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:100)
	at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:58)
	at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:142)
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:122)
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:419)
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:383)
	at ch.qos.logback.classic.Logger.log(Logger.java:765)
	at org.apache.commons.logging.LogAdapter$Slf4jLocationAwareLog.error(LogAdapter.java:428)
	at org.springframework.boot.SpringApplication.reportFailure(SpringApplication.java:826)
	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:801)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140)
	at com.example.ResourceHandlingApplication.main(ResourceHandlingApplication.java:60)
	... 8 more
%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]%PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[clr] %PARSER_ERROR[m]%PARSER_ERROR[n]%PARSER_ERROR[wEx]
Application failed to start
java.lang.IllegalStateException: Application failed to start
	at org.springframework.boot.context.embedded.AbstractApplicationLauncher.lambda$awaitServerPort$0(AbstractApplicationLauncher.java:100)
	at org.awaitility.core.ConditionFactory$1.matchesSafely(ConditionFactory.java:609)
	at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:67)
	at org.awaitility.core.AbstractHamcrestCondition.lambda$new$0(AbstractHamcrestCondition.java:49)
	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:203)
	at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:190)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:830)
	Suppressed: java.lang.NullPointerException
		at org.springframework.boot.context.embedded.AbstractApplicationLauncher.afterEach(AbstractApplicationLauncher.java:60)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachCallbacks$11(TestMethodTestDescriptor.java:245)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$12(TestMethodTestDescriptor.java:256)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:256)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAllAfterMethodsOrCallbacks(TestMethodTestDescriptor.java:255)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeAfterEachCallbacks(TestMethodTestDescriptor.java:244)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:141)
		at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:69)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
		at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
		at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask$DefaultDynamicTestExecutor.execute(NodeTestTask.java:198)
		at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:138)
		at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.lambda$execute$2(TestTemplateTestDescriptor.java:106)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
		at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
		at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
		at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
		at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
		at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
		at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
		at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
		at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
		at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
		at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
		at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
		at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
		at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
		at java.base/java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1605)
		at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
		at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
		at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
		at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
		at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
		at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:274)
		at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621)
		at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
		at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
		at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
		at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
		at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
		at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
		at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:106)
		at org.junit.jupiter.engine.descriptor.TestTemplateTestDescriptor.execute(TestTemplateTestDescriptor.java:41)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
		at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
		at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
		at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
		at java.base/java.util.ArrayList.forEach(ArrayList.java:1507)
		at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
		at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
		at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
		at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
		at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
		at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
		at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
		at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
		at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
		at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
		at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
		at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
		at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
		at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
		at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
		at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:567)
		at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
		at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
		at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
		at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
		at com.sun.proxy.$Proxy2.stop(Unknown Source)
		at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
		at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
		at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
		at java.base/java.lang.reflect.Method.invoke(Method.java:567)
		at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
		at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
		at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
		at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
		at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412)
		at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
		at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
		at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
		... 1 more

Cheers, Christoph

closed time in a month

dreis2211

issue commentspring-projects/spring-boot

Fix EmbeddedServletContainerJarPackagingIntegrationTests

Thanks @dreis2211, that issue is for something different but I got to this one in 951d0b0fdf02e3ce4373a38ef596a765dd5d0848

dreis2211

comment created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 21986143594253e072d0166455cd6d6d2b3bedbc

Fix incorrect spring replace due to `"` change

view details

push time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 0209cd3e4c00e227ceed89ed77c0a81635de1bfc

Polish quote form used in Gradle scripts Replace Gradle single quote strings with the double quote form whenever possible. The change helps to being consistency to the dependencies section where mostly single quotes were used, but occasionally double quotes were required due to `${}` references.

view details

Phillip Webb

commit sha e0013454b54e38fd11dc9fc3e87e9e5e30a450cc

Use parentheses when declaring dependencies Update all dependencies declarations to use the form `scope(reference)` rather than `scope reference`. Prior to this commit we declared dependencies without parentheses unless we were forced to add them due to an `exclude`.

view details

push time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha b4229239ab2ef4fe175aabb5e51f57d688084914

Protect against NPE in server tests Update `AbstractApplicationLauncher` to not attempt to shutdown the process if startup fails.

view details

Phillip Webb

commit sha 951d0b0fdf02e3ce4373a38ef596a765dd5d0848

Fix exploded jar classloader issues Fix a bug in `ExplodedURLClassLoader` and merge the code into the existing `LaunchedURLClassLoader` class. Also polish a few method names relating to layer support. See gh-19848 See gh-19767

view details

push time in a month

issue openedspring-projects/spring-boot

Server tests can pick up incorrect loader classes

Whilst working an issue in spring-boot-loader I noticed that spring-boot-server-tests didn't appear to pick up the latest code. This might be because the loaded classes are an implicit dependency obtained via spring-boot-loader-tools.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha e28338d6cd483896dc1632653cff90d5da8fd9e9

Rename spring-boot-cloudnativebuildpack Rename the `spring-boot-cloudnativebuildpack` module to `spring-boot-buildpack-platform` and update the the package name to `org.springframework.boot.buildpack.platform`. Closes gh-19851

view details

push time in a month

issue closedspring-projects/spring-boot

Rename cloudnativebuildpack

Rename spring-boot-cloudnativebuildpack to spring-boot-buildpack-platform. The package will be org.springframework.boot.buildpack.platform.

closed time in a month

philwebb

push eventspring-projects/spring-boot

Scott Frederick

commit sha 288889685daaae3feab50c8ad8cedaf01b183a9b

Change default BootstrapMode for JPA repositories Change the default `BootstrapMode` for auto-configured `JpaRepositories` to `BootstrapMode.DEFERRED` to allow the initialization of `EntityManagerFactory` to be parallelized for increased startup efficiency. Prior to this change, the default BootstrapMode for all auto-configured Spring Data repositories was `BootstrapMode.DEFAULT`. Closes gh-16230

view details

push time in a month

issue openedspring-projects/spring-boot

Rename spring-boot-layertools

We should rename spring-boot-layertools to spring-boot-jarmode-layertools.

created time in a month

issue openedspring-projects/spring-boot

Rename cloudnativebuildpack

Rename spring-boot-cloudnativebuildpack to spring-boot-buildpack-platform. The package will be org.springframework.boot.buildpack.platform.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 3af4930f7530527bfc4dc7e7bf7cd137322085cb

Add cloudnativebuildpack to dependencies Update the managed dependencies to include the recently added `spring-boot-cloudnativebuildpack` module. See gh-19828

view details

Phillip Webb

commit sha d5a70688cb75be9180c81049f8e1c18c29dd4d15

Reserve layer names for future use Update layered jar support so that the name `ext` and any name starting `springboot` are reserved. See gh-19767

view details

Phillip Webb

commit sha 73a42050d63403fc6791ac3b55ceca747637ca85

Add jarmode support to the loader code Update the `Launcher` class to allow a packaged jar to be launched in a different mode. The launcher now checks for a `jarmode` property and attempts to find a `JarMode` implementation using the standard `spring.factories` mechanism. Closes gh-19848

view details

Phillip Webb

commit sha e513fe4666acb99c97fdbedd85afb85849bb753f

Add layertools jarmode Add a new `spring-boot-layertools` module which provides jarmode support for working with layers. The module works with both classic fat jars, as well as layered jars. Closes gh-19849

view details

push time in a month

issue closedspring-projects/spring-boot

Add layertools jarmode

We'd like to support a jarmode that can be used to list and extract layers.

closed time in a month

philwebb

issue closedspring-projects/spring-boot

Add jarmode support to the loader code

It would be useful to support launching a fat jar in an alternate mode, for example to support extracting layers.

closed time in a month

philwebb

issue openedspring-projects/spring-boot

Add layertools jarmode

We'd like to support a jarmode that can be used to list and extract layers.

created time in a month

issue openedspring-projects/spring-boot

Add jarmode support to the loader code

It would be useful to support launching a fat jar in an alternate mode, for example to support extracting layers.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha bfd2ca7fd993f0edb60ad68395ef8a1489944c6b

Polish Gradle expression references Expand all expression `$` references to the full `${...}` form.

view details

Phillip Webb

commit sha 7d8f8d47c8817f5de3549efed52836c51bf2a5fb

Fix packager code to generate layer index file Update `Packager` to create the layer index file when repackaging. Closes gh-19767

view details

push time in a month

issue closedspring-projects/spring-boot

Support generation and loading of layered jars

As part of #19697 we need to update the Repackager to generate layered JARs and update the JarLauncher to support them.

closed time in a month

philwebb

issue commentspring-projects/spring-boot

Change default Freemarker template file extension to .ftlh to enable HTML escaping

@duttonw It's covered in the release notes under the Freemarker templates configuration section.

jamesbarnett91

comment created time in a month

issue closedspring-projects/spring-boot

Use the same classpath ordering for an exploded directory and an archive

demo.zip

Print classloader urls in main method:

	public static void main(String[] args) {
		URLClassLoader classLoader = (URLClassLoader) Thread.currentThread().getContextClassLoader();
		for(URL url : classLoader.getURLs()) {
			System.err.println(url);
		}
		SpringApplication.run(DemoApplication.class, args);
	}
  • Run as jar
mvn clean package -DskipTests
$ java -jar target/demo-0.0.1-SNAPSHOT.jar

output:

jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/classes!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-starter-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-context-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-aop-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-beans-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-expression-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-autoconfigure-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-boot-starter-logging-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/logback-classic-1.1.11.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/logback-core-1.1.11.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/jcl-over-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/jul-to-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/log4j-over-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/spring-core-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/snakeyaml-1.17.jar!/
jar:file:/private/tmp/demo/target/demo-0.0.1-SNAPSHOT.jar!/BOOT-INF/lib/slf4j-api-1.7.25.jar!/
  • Run in directory
cd target
unzip demo-0.0.1-SNAPSHOT.jar -d demo
cd demo
java org.springframework.boot.loader.PropertiesLauncher

output:

file:/private/tmp/demo/target/demo/BOOT-INF/classes/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/jcl-over-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/jul-to-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/log4j-over-slf4j-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/logback-classic-1.1.11.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/logback-core-1.1.11.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/slf4j-api-1.7.25.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/snakeyaml-1.17.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-aop-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-beans-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-boot-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-boot-autoconfigure-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-boot-starter-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-boot-starter-logging-1.5.3.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-context-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-core-4.3.8.RELEASE.jar!/
jar:file:/private/tmp/demo/target/demo/BOOT-INF/lib/spring-expression-4.3.8.RELEASE.jar!/

The order of classLoader urls is very important.

When run app in exploded directory, the order of jars is different.

I recommend add a index file BOOT-INF/INDEX.LIST to save the order of jars.

See also:

  • http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html#Index_File_Specification
  • #8397

closed time in a month

hengyunabc

issue commentspring-projects/spring-boot

Use the same classpath ordering for an exploded directory and an archive

I've opened #19847 for the Gradle part.

hengyunabc

comment created time in a month

issue openedspring-projects/spring-boot

Write classpath index file from Gradle plugin

See #9128 for details. We need an update to the Gradle plugin to support this.

created time in a month

issue commentspring-projects/spring-boot

Asciidoctor warnings due to javadoc conversion

I thought I'd seen IDE errors as well, but now I'm not so sure.

philwebb

comment created time in a month

issue commentspring-projects/spring-boot

Remove spring-boot-starter-cloud-connectors

Lets do it. We can even try to get it into M1 if there's time.

scottfrederick

comment created time in a month

issue commentspring-projects/spring-boot

ConfigurationProperties can't inject environment variable with dash prefix in linux

There is no reason why a hyphen cannot be interpreted as an underscore.

Unfortunately there is a reason why we can't just treat a hyphen as an underscore (in fact we used to have a much more flexible binding mechanism in Spring Boot 1.5 but we changed it because it caused a lot of subtle issues). Depending on the environment, not all property sources may be iterable. With some PropertySource implementation we can only ask "what's the value of the property named 'X'", we can't ask "what are all property names that you know about".

In order to support those non-iterable sources, we need an algorithm that can take a configuration key and convert it into a name. In the example above we'd do this:

  1. Initial name = vcap.services.s3-mct-service.credentials
  2. Remove hyphens = vcap.services.s3mctservice.credentials
  3. Convert dots to underscores = vcap_services_s3mctservice_credentials
  4. Uppercase = VCAP_SERVICES_S3MCTSERVICE_CREDENTIALS

If we allow hyphens we can't make unique mappings. I.e. vcap.services.s3-mct-service.credentials, vcap.services.s3.mct-service.credentials, vcap.services.s3-mct.service.credentials, vcap.services.s3-mct-service-credentials all end up as VCAP_SERVICES_S3_MCT_SERVICE_CREDENTIALS.

Although the restriction can cause some confusion (as OP pointed out), we've generally found these strict rules to be much less error-prone overall.

devkanro

comment created time in a month

issue closedspring-projects/spring-boot

SearchStrategy of ConditionalOnSingleCandidate annotation only consider SearchStrategy.ALL

When I was browsing the source code, I found that OnBeanCondition.class on ConditionalOnSingleCandidate annotation, match the singleAutowireCandidate method only consider SearchStrategy of SearchStrategy.ALL. Line number is: 143.

the original source code was this:

else if (!hasSingleAutowireCandidate(context.getBeanFactory(),
		matchResult.getNamesOfAllMatches(),
		spec.getStrategy() == SearchStrategy.ALL)) {
	return ConditionOutcome.noMatch(ConditionMessage
			.forCondition(ConditionalOnSingleCandidate.class, spec)
			.didNotFind("a primary bean from beans")
			.items(Style.QUOTE, matchResult.getNamesOfAllMatches()));
}

I wonder why we don't consider two other strategies here。

closed time in a month

zxm812

issue commentspring-projects/spring-boot

SearchStrategy of ConditionalOnSingleCandidate annotation only consider SearchStrategy.ALL

It's not so clear from the formatting, but the spec.getStrategy() == SearchStrategy.ALL is not part of the if. It's actually the third argument to hasSingleAutowireCandidate (named considerHierarchy).

So all it's saying is if spec.getStrategy() == SearchStrategy.ALL then we will search the full application context hierarchy, otherwise we just search the current application context.

zxm812

comment created time in a month

issue commentspring-projects/spring-boot

Custom Error Page not working when getErrorPath() returns path other than "/error"

I don't think so, but I've not had time to confirm for sure yet.

brucebrit

comment created time in a month

issue commentspring-projects/spring-boot

Support generation and loading of layered jars

I messed up and managed to not actually write the index file.

philwebb

comment created time in a month

IssuesEvent

issue commentspring-projects/spring-boot

Custom Error Page not working when getErrorPath() returns path other than "/error"

I have a feeling that the interface is unnecessary since Spring Boot 2.0, but I need to double check. I think that setting the server.error.path property is now the only way to customize the actual error path.

If I remember correctly, we used to use ErrorController to allow us to configure security, but we substantially simplified that in Spring Boot 2.0.

brucebrit

comment created time in a month

issue commentspring-projects/spring-boot

Add build-image support to the maven plugin

I've made a start on this but integration tests are need and documentation updates are required.

philwebb

comment created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha aa1954717cce4786e056153868a334054cd51a01

Add cloud native buildpack module Add a Java implementation of the buildpacks.io specification allowing projects to be packaged into OCI containers. The `builder` class provides a Java equivalent of `pack build` command and is based on the `pack` CLI Go code published at https://github.com/buildpacks/pack. Closes gh-19828

view details

Phillip Webb

commit sha 16e6bc89ed2f074c0fba8eab4d9115d0d6ac2dcd

Create a new ImagePackager tools class Pull functionality from `Repackager` into a new `Packager` base class and develop a variant for Docker image creation. The new `ImagePackager` class provides a general purpose way to construct jar entries without being tied to an actual file. This will allow us to link it to a buildpack and provide application content directly. Closes gh-19834

view details

Phillip Webb

commit sha cb4928ad51383866f04805c0b5c6924e0da12109

Add build-image support to the maven plugin Add a new `build-image` goal to the Maven plugin to allow Docker images to be create via using the cloud native buildpack. See gh-19830

view details

push time in a month

issue closedspring-projects/spring-boot

Create a new ImagePackager tools class

The current Repackager class isn't flexible enough to be reused to create Docker images. We need to split it up so that we can create docker images without needing to write a fat jar to disk.

closed time in a month

philwebb

issue closedspring-projects/spring-boot

Add cloud native buildpack module

In order to support buildpack base image creation we'll need to port part of pack from Go to Java.

closed time in a month

philwebb

issue closedspring-projects/spring-boot

Maven build produces encoding warnings

Building a project now appears to give the following warnings:

[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ demo ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Please take a look into the FAQ: https://maven.apache.org/general.html#encoding-warning
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ demo ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/pwebb/projects/spring-boot/samples/demo/src/test/resources
[INFO] 

closed time in a month

philwebb

issue commentspring-projects/spring-boot

Maven build produces encoding warnings

Ah yes, thanks. I'm a bit behind with issues and I just threw it in without checking.

philwebb

comment created time in a month

issue openedspring-projects/spring-boot

Create a new ImagePackager tools class

The current Repackager class isn't flexible enough to be reused to create Docker images. We need to split it up so that we can create docker images without needing to write a fat jar to disk.

created time in a month

push eventphilwebb/spring-boot

Stephane Nicoll

commit sha 986bef9cba2933aebb890c1f35748ff425396dfb

Upgrade to Spring Data Neumann-M2 Closes gh-19588

view details

Andy Wilkinson

commit sha 2ac931cacb3bb23dd1c23e4c5a8e1d1b4062e267

Log some information about all test failures when the build completes Closes gh-19696

view details

Andy Wilkinson

commit sha 724597d45f229ea14f0f3e815c57b32daeafb96e

Use a centrally managed version for commons-compress

view details

Andy Wilkinson

commit sha 736963e7db2d568f841e5a77366683c547cde393

Update ConventionsPlugin's javadoc See gh-19784

view details

Andy Wilkinson

commit sha 04d6b21dfbbd24aec57241619b9e3d2d8d48a1df

Sort test failures before logging them See gh-19696

view details

Andy Wilkinson

commit sha 408f17f8211571632d21b323e8f86d82a3a76eb9

Close FileInputStreams in RepackagerTests

view details

Andy Wilkinson

commit sha 60fcc4bab1418cc2f03fa107afe1780a0b6f53c4

Upgrade to Spring AMQP 2.2.3.RELEASE Closes gh-19651

view details

Andy Wilkinson

commit sha 34ac3c5f7ddded1eafe543a027892c751bb82622

Upgrade to spring-javaformat 0.0.19 Closes gh-19710

view details

Andy Wilkinson

commit sha fabd69281271b3efca2e8c126cf2fb620fdc7929

Upgrade to Spring HATEOAS 1.1.0.M1 Closes gh-19649

view details

Andy Wilkinson

commit sha b44442ee3c273b16c1e2d1bff52d3266407f00dc

Merge branch '2.1.x' into 2.2.x Closes gh-19799

view details

Andy Wilkinson

commit sha c5e47c725cea7b31d8580f52b2dbe355647a1e5b

Merge branch '2.2.x' Closes gh-19800

view details

Andy Wilkinson

commit sha 55d7f8b87607163a1052ef0cd74efbf9a78ae531

Restore previous credhub references for cache username and password The references with . in them did not work, resulting in pushing to the remote cache being disabled.

view details

Andy Wilkinson

commit sha aeca44d3d763b5faaa4586f3d70d51b3a13aaac6

Revise credhub references for Gradle Enterprise cache user

view details

Andy Wilkinson

commit sha bfdb49f2a2b24b4f38e96f252ba052e298159f21

Retry when findAvailableTcpPort returns an unavailable port Closes gh-19801

view details

Andy Wilkinson

commit sha 468eca91e928fa18796138c84fbb921513951b7a

Apply Java conventions to projects that only apply Java base plugin Fixes gh-19806

view details

Stephane Nicoll

commit sha ae561ce59b0167af0b354a9bda45abab207d84ef

Upgrade to Reactor Dysprosium-SR4 Closes gh-19795

view details

Stephane Nicoll

commit sha 39257247cfbce408cc8867131a2c473b43faf4e8

Merge branch '2.2.x'

view details

Stephane Nicoll

commit sha 4ab19c3cfb398c73969a0b88d68f474c237a794e

Upgrade to Reactor Dysprosium-SR4 Closes gh-19809

view details

Stephane Nicoll

commit sha 11efe172e9687bb384106e65d2e3a68953d76f9b

Upgrade Java 11 version in CI image Closes gh-19763

view details

Stephane Nicoll

commit sha 938c7a6d9f3b90cf48e3eb9259c4a84fd4736677

Merge branch '2.1.x' into 2.2.x Closes gh-19763 in 2.2.4

view details

push time in a month

issue openedspring-projects/spring-boot

Drop getDefaultDirsLayer and getStackLayer from EphemeralBuilder

The methods are not needed since the layers are already present.

created time in a month

issue openedspring-projects/spring-boot

Add buildImage support to the gradle plugin

We need to update the gradle plugin to allow images to be created via the cloud native buildpack.

created time in a month

issue openedspring-projects/spring-boot

Add build-image support to the maven plugin

We need to update the maven plugin to allow images to be created via the cloud native buildpack.

created time in a month

issue openedspring-projects/spring-boot

Update buildpack support for lifecycle v6

The current code does not yet support v6. We need to port this PR from Go to Java.

created time in a month

issue openedspring-projects/spring-boot

Add cloud native buildpack module

In order to support buildpack base image creation we'll need to port part of pack from Go to Java.

created time in a month

issue commentspring-projects/spring-boot

Maven build produces encoding warnings

Looks like the properties section is to blame.

Old:

  <properties>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
    <resource.delimiter>@</resource.delimiter>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.target>${java.version}</maven.compiler.target>
  </properties>

New:

  <properties>
    <java.version>1.8</java.version>
    <resource.delimiter>@</resource.delimiter>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
  </properties>
philwebb

comment created time in a month

issue openedspring-projects/spring-boot

Maven build produces encoding warnings

Building a project now appears to give the following warnings:

[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ demo ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Please take a look into the FAQ: https://maven.apache.org/general.html#encoding-warning
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ demo ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/pwebb/projects/spring-boot/samples/demo/src/test/resources
[INFO] 

created time in a month

push eventpivotal-legacy/homebrew-tap

Stephane Nicoll

commit sha 6b3780978c9a2fe0e35186e9fee6fd41bb0effb8

Upgrade to Spring Boot 2.2.4.RELEASE

view details

push time in a month

create barnchphilwebb/spring-boot

branch : jpack4

created branch time in a month

issue openedspring-projects/spring-boot

JarWriter.InputStreamEntryWriter consumes too much memory

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown -->

created time in a month

issue openedspring-projects/spring-boot

Upgrade to Reactor Dysprosium-SR4 (for Reactor Netty 0.9.4)

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown -->

created time in a month

issue commentspring-projects/spring-boot

Support generation and loading of layered jars

We'll handle the Gradle work in #19792

philwebb

comment created time in a month

issue closedspring-projects/spring-boot

Support generation and loading of layered jars

As part of #19697 we need to update the Repackager to generate layered JARs and update the JarLauncher to support them.

closed time in a month

philwebb

issue openedspring-projects/spring-boot

Update the Gradle plugin with an option to generate layered jars

<!-- Thanks for raising a Spring Boot issue. Please take the time to review the following categories as some of them do not apply here.

🙅 "Please DO NOT Raise an Issue" Cases

  • Question STOP!! Please ask questions about how to use something, or to understand why something isn't working as you expect it to, on Stack Overflow using the spring-boot tag.
  • Security Vulnerability STOP!! Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
  • Managed Dependency Upgrade You DO NOT need to raise an issue for a managed dependency version upgrade as there's a semi-automatic process for checking managed dependencies for new versions before a release. BUT pull requests for upgrades that are more involved than just a version property change are still most welcome.
  • With an Immediate Pull Request An issue will be closed as a duplicate of the immediate pull request, so you don't have to raise an issue if you plan to create a pull request immediately.

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

🎁 Enhancement (please don't include this emoji/text, just add your details) Please start by describing the problem that you are trying to solve. There may already be a solution, or there may be a way to solve it that you hadn't considered.

TIP: You can always edit your issue if it isn't formatted correctly. See https://guides.github.com/features/mastering-markdown -->

created time in a month

issue commentspring-projects/spring-boot

Asciidoctor warnings due to javadoc conversion

What I meant was we have comments like this in ServerProperties:

/**
 * Comma-separated list of additional unencoded characters that should be allowed
 * in URI paths. Only "< > [ \ ] ^ ` { | }" are allowed.
 */

Those cause javadoc warnings because < should be written as &lt;. We've generally tried to avoid javadoc specific markup in the configuration properties but I think these are different.

If we replaced those chars, I don't know what the impact would be on the JSON generation.

philwebb

comment created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha 0bb00c9a43cae4f6904819945c1a664daaf2f787

Compile with Java with the '-parameters' option Update the `ConventionsPlugin` to apply the `-parameters` compiler argument. Closes gh-19784

view details

push time in a month

issue closedspring-projects/spring-boot

Gradle build is not compiling with parameters option

The maven build had it as an option, but I think we're missing it from the Gradle build.

closed time in a month

philwebb

issue closedspring-projects/spring-boot

ConditionalOnBean.parameterizedContainer on overloading @bean method, it will expression ambiguous behavior

when i test the parameterizedContainer annotation parameter on overloading @Bean method. found that the first bean method init more than once,but another never init。 code like this:

/**
 * @author zhangxm
 * @date 2020-01-17
 */
@Configuration
public class ConditionOnBeanTest {

    @Bean(name = "testBean1")
    @ConditionalOnBean(parameterizedContainer = {List.class})
    public List<ConditionOnBeanTest> testBean(int intParameterTest, long longParameterTest) {
        System.out.println("testListStringBean -- intParameterTest");
        return Collections.singletonList(new ConditionOnBeanTest());
    }

    @Bean(name = "testBean2")
    @ConditionalOnBean(parameterizedContainer = {List.class})
    public List<ConditionOnBeanTest> testBean(String stringParameterTest) {
        System.out.println("testListStringBean -- stringParameterTest");
        return Collections.singletonList(new ConditionOnBeanTest());
    }

    @Bean
    public String testStringBean() {
        System.out.println("testStringBean");
        return "testStringBean";
    }

    @Bean
    public int testIntBean() {
        System.out.println("testIntBean");
        return 812;
    }

    @Bean
    public long testLongBean() {
        System.out.println("testLongBean");
        return 8120L;
    }

}

closed time in a month

zxm812

issue commentspring-projects/spring-boot

ConditionalOnBean.parameterizedContainer on overloading @bean method, it will expression ambiguous behavior

As mentioned in the Javadoc you should only use @ConditionOnBean for auto-configuration classes. Furthermore, it doesn't really make sense to try and use it within the context of a single configuration class.

zxm812

comment created time in a month

issue openedspring-projects/spring-boot

Asciidoctor warnings due to javadoc conversion

> Task :spring-boot-project:spring-boot-docs:asciidoctorPdf
Failed to parse formatted text: Whether to disable the escaping of HTML characters such as '<', '>', etc.
Failed to parse formatted text: Whether to disable the escaping of HTML characters such as '<', '>', etc.
Failed to parse formatted text: JNDI location of the datasource. Class, url, username & password are ignored when set.
Failed to parse formatted text: JNDI location of the datasource. Class, url, username & password are ignored when set.
Failed to parse formatted text: Comma-separated list of additional unencoded characters that should be allowed in URI paths. Only "< > [ \ ] ^ ` { | }" are allowed.
Failed to parse formatted text: Comma-separated list of additional unencoded characters that should be allowed in URI query strings. Only "< > [ \ ] ^ ` { | }" are allowed.
Failed to parse formatted text: Comma-separated list of additional unencoded characters that should be allowed in URI paths. Only "< > [ \ ] ^ ` { | }" are allowed.
Failed to parse formatted text: Comma-separated list of additional unencoded characters that should be allowed in URI query strings. Only "< > [ \ ] ^ ` { | }" are allowed.

I think this is due to our use if < and > in some of the configuration properties javadoc. We might want to escape those then update the converter code to deal with them. We'll also need to update the annotation processor that generates JSON.

created time in a month

issue openedspring-projects/spring-boot

Gradle build is not compiling with parameters option

The maven build had it as an option, but I think we're missing it from the Gradle build.

created time in a month

issue openedspring-projects/spring-boot

Remove TODO and FIXME comments from tests

We have a few tests that have FIXME/TODO comments. We should remove them and add issues instead.

created time in a month

push eventspring-projects/spring-boot

Phillip Webb

commit sha fd792cedaf204176709d6d77c77d801bb386aeba

Polish DisabledIfDockerUnavailable Convert `DisabledIfDockerUnavailable` to be an annotation and make it slightly less noisy.

view details

Phillip Webb

commit sha abad00754b9d2130d0e62b471ec086c1a401b904

Revert "Upgrade to Spring Data Neumann-M1" This reverts commit e44206e88eb9e82bfe4bdde5ab4dbc0bc154587b.

view details

push time in a month

issue commentspring-projects/spring-boot

Upgrade to Spring Data Neumann-M1

The upgrade causes issue because the M1 BOM is incorrect. We're waiting to see what the Data team want to do.

wilkinsona

comment created time in a month

IssuesEvent

push eventphilwebb/spring-boot-gvm-publish

Phillip Webb

commit sha fdfe3566409beeb17c06b565270fc292ffa61456

Use https

view details

push time in a month

push eventpivotal-legacy/homebrew-tap

Phillip Webb

commit sha e4b5cc9c9b5da2ab9203ef669d5f482e5a7968d8

Upgrade to Spring Boot 2.2.3.RELEASE

view details

push time in a month

push eventphilwebb/spring-boot-gvm-publish

Andy Wilkinson

commit sha ec1d4ed3e1d6af33764a3418751f9c35e63fa7ed

Only mark 2.2.x releases as the default

view details

Phillip Webb

commit sha 2d804ffd9797874d7952621ccd001c1d5a372751

Merge pull request #3 from wilkinsona * pr/3: Only mark 2.2.x releases as the default Closes gh-17005

view details

push time in a month

issue commentspring-projects/spring-framework

ClassCastException in TypeMappedAnnotation during ClassPathScanningCandidateComponentProvider#scanCandidateComponents

I think the change looks right. I probably need to see the actual commit to be sure. The only thing that concerns me is how similar two areEquivalent method appear. @sbrannen If you have a commit lined up I'll take a look in a debugger when I get a sec.

AndreasKl

comment created time in a month

issue commentspring-io/spring-javaformat

Setup "remove redundant type arguments" save action

The eclipse plugin configures project specific settings and this is one option that we could set. Basically, Eclipse has the feature but the plugin currently disables it.

philwebb

comment created time in a month

pull request commentspring-projects/spring-boot

Allow custom url in @AutoConfigureTestDatabase

See #19038

bono007

comment created time in a month

issue commentspring-projects/spring-boot

Upgrade to Maven Resolver 1.4.1

Looks like this was fixed during the Gradle migration.

snicoll

comment created time in a month

issue closedspring-projects/spring-boot

HttpMessageConvertersAutoConfiguration not working for Reactive Web with Spring Boot 2.2.2

Version

org.springframework.cloud:spring-cloud-dependencies:Hoxton.SR1 org.springframework.boot:spring-boot-autoconfigure:2.2.2.RELEASE org.springframework:spring-webflux:5.2.2.RELEASE

Exception

aused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.boot.autoconfigure.http.HttpMessageConverters' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1695)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1253)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getObject(DefaultListableBeanFactory.java:1879)
	at org.springframework.cloud.openfeign.support.SpringDecoder.decode(SpringDecoder.java:57)
	at org.springframework.cloud.openfeign.support.ResponseEntityDecoder.decode(ResponseEntityDecoder.java:62)
	at feign.optionals.OptionalDecoder.decode(OptionalDecoder.java:36)
	at feign.SynchronousMethodHandler.decode(SynchronousMethodHandler.java:178)
	... 33 common frames omitted

Investigate

I tried to print debug information.

   HttpMessageConvertersAutoConfiguration:
      Did not match:
         - NoneNestedConditions 1 matched 0 did not; NestedCondition on HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition.ReactiveWebApplication found ConfigurableReactiveWebEnvironment (HttpMessageConvertersAutoConfiguration.NotReactiveWebApplicationCondition)
      Matched:
         - @ConditionalOnClass found required class 'org.springframework.http.converter.HttpMessageConverter' (OnClassCondition)

I read the source code HttpMessageConvertersAutoConfiguration.java and found the difference between Spring Boot 2.1.6 and 2.2.2. This codes was added:

	static class NotReactiveWebApplicationCondition extends NoneNestedConditions {

		NotReactiveWebApplicationCondition() {
			super(ConfigurationPhase.PARSE_CONFIGURATION);
		}

		@ConditionalOnWebApplication(type = Type.REACTIVE)
		private static class ReactiveWebApplication {

		}
	}
	

Is there any way to configure it correctly? Thanks a log.

closed time in a month

Macrame

issue commentspring-projects/spring-boot

HttpMessageConvertersAutoConfiguration not working for Reactive Web with Spring Boot 2.2.2

Thanks @spencergibb, I'm going to close this one in favor of the Spring Cloud issue.

Macrame

comment created time in a month

issue closedspring-projects/spring-boot

spring-boot-dependencies library incompatibility between jetty and jersey

<!--

🐞 Bug report (please don't include this emoji/text, just add your details) Please provide details of the problem, including the version of Spring Boot that you are using. If possible, please provide a test case or sample application that reproduces the problem. This makes it much easier for us to diagnose the problem and to verify that we have fixed it.

--> The spring-boot-dependencies bom version 2.2.2.RELEASE manages both jersey and jetty versions. org.eclipse.jetty:jetty-util:9.4.24.v2191120 and org.glassfish.jersey.containers:jersey-container-jetty-http:2.29.1 are incompatible due to a change in jetty's api since version 9.4.22.v20191022. The incompatibility was fixed in jersey version 2.30 (see https://github.com/eclipse-ee4j/jersey/commit/1504174ace92ff8cbeb13f5b588edd598466e18b).

The resulting error

java.lang.IllegalAccessError: org.glassfish.jersey.jetty.JettyHttpContainerFactory$JettyConnectorThreadPool.newThread(Ljava/lang/Runnable;)Ljava/lang/Thread;

	at org.eclipse.jetty.util.thread.QueuedThreadPool.startThread(QueuedThreadPool.java:655)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.ensureThreads(QueuedThreadPool.java:642)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.doStart(QueuedThreadPool.java:182)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
	at org.eclipse.jetty.server.Server.start(Server.java:407)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:100)
	at org.eclipse.jetty.server.Server.doStart(Server.java:371)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
	at org.glassfish.jersey.test.jetty.JettyTestContainerFactory$JettyTestContainer.start(JettyTestContainerFactory.java:112)
	at org.glassfish.jersey.test.JerseyTest.setUp(JerseyTest.java:587)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)

Simple test case illustrating the problem. Make sure to add org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty to the test runtime.

public class JerseyJettyIncompatibilityTest extends JerseyTest {

	@Override
	protected Application configure() {
		ResourceConfig resourceConfig = new ResourceConfig();
		resourceConfig.property("contextConfig", new AnnotationConfigApplicationContext());
		return resourceConfig;
	}

	@Test
	public void test() {}
}

closed time in a month

NielsDoucet

issue openedspring-projects/spring-boot

Provide an implicit layer for buildpack contributions

We should define a special layer name that's reserved for external contributions to an unpacked jar. I think the current code will already support any additional layer dropped into BOOT-INF/layers but it might be better to have a specific folder (e.g. BOOT-INF/ext) or a reserved layer name.

created time in a month

issue commentspring-projects/spring-boot

Design and implement a layered jar format

Decide what to do about the Spring-Boot-Lib attribute

Since there isn't one I've dropped it when creating a layered jar. There's a new Spring-Boot-Layers-Index attribute that points to the index file. The buildpack could use this to detect the new format.

philwebb

comment created time in a month

issue commentspring-projects/spring-boot

Update the Maven plugin with an option to generate layered jars

I've pushed a small update that just adds the new option. We still need an integration test ideally.

philwebb

comment created time in a month

more