profile
viewpoint

cf-identity/concourse 0

BOSH Release

cf-identity/notifications 0

The notifications service component of CloudFoundry

cf-identity/notifications-release 0

A BOSH release that contains the notifications application and an errand to push it

issue openedcloudfoundry/spring-boot-cnb

Add support for a layered Spring Boot jar

Spring Boot 2.3.0.M1 introduced support for building layered jars. The structure for the jar is as follows:

META-INF/
  MANIFEST.MF
org/
  springframework/
    boot/
      loader/
        ...
BOOT-INF/
  layers/
    <name>/
      classes/
        ...
      lib/
        ...
    <name>/
      classes/
        ...
      lib/
        ...
  layers.idx

At the moment the layers are quite similar to what the buildpack does by default but we plan on adding support for layer customization. The buildpack can look at the layers.idx to figure out what the layers in the image are rather than using the defaults.

created time in a day

issue openedspring-projects/spring-boot

Provide a way to customize layers with the Gradle plugin

<!-- 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 day

issue openedspring-projects/spring-boot

Provide a way to customize layers with the Maven plugin

<!-- 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 day

issue commentspring-projects/spring-boot

Enhancements for new LAYERED_JAR layout in spring-boot-maven-plugin

@aritzbastida Thank you for trying out the Spring Boot milestone and providing feedback. I'll try to speak to some of the points you've mentioned above.

For layer customization, this is something we are planning to support. It is listed as one of the items in the original issue.

Regarding skipping packaging of the fat jar for layered support, this is something we had considered. This reply from @wilkinsona on the blog post addresses why we think layering the jar has advantages. Indeed the concise docker file is a benefit to the approach you suggested.

Flagging for team attention so that we can discuss this on our team call since it is something that has come up before.

aritzbastida

comment created time in 2 days

push eventspring-projects/spring-boot

Dmytro Nosan

commit sha 1a8c321a7bb63f1ddd341ea69e47357c9f3937ff

Support nested requests in MetricsClientHttpRequestInterceptor Prior to this commit, requests made by `HttpRequestInterceptor` instances configured on `RestTemplate` would not be recorded properly. This commit ensures that nested requests are recorded separately. Closes gh-20231

view details

Madhura Bhave

commit sha 2086ed1b8c322476d8cbd0ba47cc6f8577389c2b

Merge branch '2.2.x'

view details

push time in 3 days

issue closedspring-projects/spring-boot

Metrics are not recorded for nested requests made with RestTemplate

We need to back port the fix for #19464 to 2.2.x.

closed time in 3 days

wilkinsona

push eventspring-projects/spring-boot

Dmytro Nosan

commit sha 1a8c321a7bb63f1ddd341ea69e47357c9f3937ff

Support nested requests in MetricsClientHttpRequestInterceptor Prior to this commit, requests made by `HttpRequestInterceptor` instances configured on `RestTemplate` would not be recorded properly. This commit ensures that nested requests are recorded separately. Closes gh-20231

view details

push time in 3 days

issue closedspring-projects/spring-boot

TestNG smoke test doesn't test anything

The test class and its method are package-private which means that no tests are run. They cannot be made public until https://github.com/spring-io/spring-javaformat/issues/152 is fixed or we configure a Checkstyle suppression.

closed time in 3 days

wilkinsona

issue commentspring-projects/spring-boot

TestNG smoke test doesn't test anything

I think we can close this since testHome is now public with a checkstyle suppression.

wilkinsona

comment created time in 3 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 95f8f83833c174eda24c37db2e65a4da95fc5d6f

Remove spring security dependencies from Rsocket starter Fixes gh-20243

view details

push time in 3 days

issue closedspring-projects/spring-boot

spring-boot-starter-rsocket pom contains security dependencies

It appears that as of spring-boot-starter-rsocket-2.3.0.M1.pom it contains Spring Security dependencies that are being pulled in transitively. The dependencies are in 2.3.0.M2 and the latest 2.3.0.BUILD-SNAPSHOT:

<dependency>
  <groupId>org.springframework.security</groupId>
  <artifactId>spring-security-config</artifactId>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.springframework.security</groupId>
  <artifactId>spring-security-web</artifactId>
  <scope>compile</scope>
</dependency>

This means that simply adding the spring-boot-starter-rsocket triggers the Spring Boot auto configuration for Security.

This was originally brought to my attention because @joshlong was having difficulties doing a demo and asked for my help. I haven't investigated the scope of the problem, so it would probably be good to check if other dependencies are impacted.

closed time in 3 days

rwinch

issue commentspring-projects/spring-boot

spring-boot-starter-rsocket pom contains security dependencies

Seems like that to me. Since you don't remember anything related to this either, I'll mark it as a bug.

rwinch

comment created time in 3 days

issue commentspring-projects/spring-boot

spring-boot-starter-rsocket pom contains security dependencies

Those dependencies are explicitly included in the build.gradle. They aren't in 2.2.x so I'm not sure if there was a reason for adding them in master or an oversight. Flagging for team attention to see if anyone remembers.

rwinch

comment created time in 3 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha c5bce2b99d6c69bee4655f0803a5d3659e6383ae

Fix gradle plugin validation error

view details

push time in 3 days

issue closedspring-projects/spring-boot

@AutoConfigureAfter not working as expected

I have a simple nested autoconfig which loads 1 of the 2 beans depending on the conditional check. Something like

@Configuration
@ConditionalOnWebApplication
public class ServiceAutoConfiguration {

  @Configuration
  //used if a Undertow is present
  @ConditionalOnClass(name = "io.undertow.Undertow")
  static class OptionConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public ConfigHelper configHelper() {
      return new ConfigHelper("Option 1");
    }
  }

  @Configuration
  //used if a Undertow is absent
  @ConditionalOnMissingClass(value = "io.undertow.Undertow")
  static class DefaultConfiguration {

    @Bean
    @ConditionalOnMissingBean
    public ConfigHelper configHelper() {
      return new ConfigHelper("Default");
    }
  }

  static class ConfigHelper {
     public ConfigHelper(String val) {
        System.out.println("Value= "+ val);
    }
  }
}

This works great. Now I need to add another conditional bean which needs to be checked depending on a Property set. So I create another nested class in ServiceAutoConfiguration like

 @Configuration
  //used if a property is explicitly set
  static class NoopConfiguration {

    @Bean
    @ConditionalOnProperty(name = "a.b.c", havingValue = "true")
    public ConfigHelper configHelper() {
      return new ConfigHelper("NOOP");
    }
  }

I also add @AutoConfigureAfter(NoopConfiguration.class) on the existing 2 configuration so that they are loaded only after checking the newly added config.

However the context is loading the bean defined in DefaultConfiguration first and then trying to load the bean defined in NoopConfiguration (as I have defined the property a.b.c=true) which fails expectedly due to duplicate bean and overriding disabled. I only want 1 of the 3 beans to be instantiated.

Based on my understanding the @AutoConfigureAfter should order the NoopConfiguration before the other 2 classes.

interestingly, if I change the name of NoopConfiguration to ANoopConfiguration I get the desired result with ANoopConfiguration getting loaded prior to DefaultConfiguration and no exception occurs. It is not clear why the classes are loaded in alphabetical order irrespective of AutoConfigureAfter

The behavior was working till a while back and suddenly stopped working(with no change to springboot version). is there a way to control the ordering of the auto config class.

The above test is available at https://github.com/ranarula/configureafter

closed time in 3 days

ranarula

issue commentspring-projects/spring-boot

@AutoConfigureAfter not working as expected

To add to what Spencer said, you can order nested classes using an explicit @Import. We do that here.

ranarula

comment created time in 3 days

issue commentspring-projects/spring-boot

MetricsWebMvcConfigurer bean should take a list of WebMvcTagsProviders

Thanks for the additional context @berngp. The issue has been triaged and is assigned to the 2.3.x milestone which means that we are considering adding support for this in Spring Boot itself. As @wilkinsona mentioned above, we're going to give the contributor approach a try. This should allow both the library and app to contribute tags that the DefaultWebMvcTagsProvider can use.

jfernandez

comment created time in 3 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 15cd590f7f6411945e3c2530f4e140641a5ef244

Allow users to opt out of including the layer tools in a layered jar For Maven, the layer configuration is now an additional configuration option instead of a layout type. Closes gh-19866

view details

push time in 3 days

issue closedspring-projects/spring-boot

Allow users to opt out of including the layer tools in a layered jar

We should surface options in Maven and Gradle that let you opt-out of the layertools jar.

closed time in 3 days

philwebb

issue commentspring-io/issue-bot

Waiting for feedback label is removed too early in some edge cases

If more feedback is needed and without it the issue cannot be scheduled then the clock should be on, no?

Yes. The issue is when the clock should be reset. If the original feedback-provided was accurate and more feedback is needed, the clock should be reset. If the original feedback-provided was not actual feedback from the reporter (the bot guessed wrong), then ideally the clock should not be reset.

dreis2211

comment created time in 4 days

issue commentspring-io/issue-bot

Waiting for feedback label is removed too early in some edge cases

It's tricky. The fact that we removed feedback-provided and left waiting-for-feedback on could mean that the bot guessed wrong and the original reporter didn’t actually provide feedback. It could, however, also mean that the feedback that was provided moved the discussion on but led to a different question being asked where some more feedback was needed. Ideally we'd only want to reset it in the latter case.

dreis2211

comment created time in 4 days

issue commentspring-io/issue-bot

Waiting for feedback label is removed too early in some edge cases

I think that would be a change we have to make as part of this issue then? IIRC the clock is based only on the presence of the waiting-for-feedback label at the moment.

dreis2211

comment created time in 4 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha aa09058d8c78e429219e12663c4768fea722ba3a

Remove implicit layers support from the layer tools Closes gh-20187

view details

push time in 4 days

issue closedspring-projects/spring-boot

Remove implicit layers support from the layer tools

We discussed this today and have a few concerns:

  • We're duplicating a concept between the loader tools and the layer tools.
  • It's surprising that you can use layered tools in an unlayered jar
  • If we want to add a layer for jars in the same group, that won't be possible with the implicit layers as the info about the group ID isn't available.

We've concluded that we should remove the implicit layer support from the layer tools. Instead, when the index can't be found in the jar, we should fail.

closed time in 4 days

wilkinsona

push eventmbhave/spring-boot

Madhura Bhave

commit sha 50009d5521b1f086f56132c6e6e0b43c69562bde

Allow maven users to opt out of including the layer tools in a layered jar Fixes gh-

view details

push time in 5 days

issue commentspring-projects/spring-boot

Binding to collection fails with unbound elements error if collection overridden in another property source with smaller number of elements

When we fix this, we should ensure that it doesn't fail if demo-properties.nested-data[2].data is unbound but it does fail if there's a property such as demo-properties.nested-data[2].foo in application.yml

anatoliy-balakirev

comment created time in 5 days

issue commentspring-io/issue-bot

Waiting for feedback label is removed too early in some edge cases

The only issue I see with not removing the waiting-for-feedback label when feedback-provided is added is if the team doesn't get to manually removing the label within 7 days. The bot will then add the feedback-reminder label along with a comment asking for feedback which might confuse the reporter.

dreis2211

comment created time in 5 days

MemberEvent

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 4ac12660c650d233f8a64e324b3d87b5dfd80fe5

Explicitly enable config properties scan in java release scripts This commit also upgrades the Spring Boot version used by the scripts to 2.2.4 which is why the explicit annotation is required. Closes gh-20174

view details

Madhura Bhave

commit sha 0ec1ed4642633902f3d4fcae6f129e928b2ac448

Merge branch '2.2.x' Closes gh-20188

view details

push time in 9 days

issue closedspring-projects/spring-boot

Enable configuration properties scanning in java release scripts

Forward port of issue #20174 to 2.3.0.M3.

closed time in 9 days

mbhave

issue openedspring-projects/spring-boot

Enable configuration properties scanning in java release scripts

Forward port of issue #20174 to 2.3.0.M3.

created time in 9 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 4ac12660c650d233f8a64e324b3d87b5dfd80fe5

Explicitly enable config properties scan in java release scripts This commit also upgrades the Spring Boot version used by the scripts to 2.2.4 which is why the explicit annotation is required. Closes gh-20174

view details

push time in 9 days

issue openedspring-projects/spring-boot

Enable configuration properties scanning in java release scripts

It was disabled as of 2.2.1

created time in 10 days

release spring-projects/spring-boot

v2.3.0.M2

released time in 10 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 97ac6c9de740a09f4b9e4dfe0770599d78552723

Polish

view details

Madhura Bhave

commit sha 4eb71fc424b14f78bc9b8ba678ef613ba8d3e760

Merge branch '2.1.x' into 2.2.x

view details

Madhura Bhave

commit sha fe325c06c210fe525b7e1bfdb5c8bebb708b634b

Merge branch '2.2.x'

view details

push time in 11 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 97ac6c9de740a09f4b9e4dfe0770599d78552723

Polish

view details

Madhura Bhave

commit sha 4eb71fc424b14f78bc9b8ba678ef613ba8d3e760

Merge branch '2.1.x' into 2.2.x

view details

push time in 11 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 97ac6c9de740a09f4b9e4dfe0770599d78552723

Polish

view details

push time in 11 days

pull request commentspring-projects/spring-boot

Verify ssl key alias on server startup

Thanks @bono007. This has now been merged into master.

bono007

comment created time in 11 days

push eventspring-projects/spring-boot

cbono

commit sha e3516059622a09ea2ff439daffaeb87c649d9667

Verify ssl key alias on server startup See gh-19202

view details

Madhura Bhave

commit sha ac91f14f05ccf7d2198f6e313f03a5c73cc1c296

Polish "Verify ssl key alias on server startup" See gh-19202

view details

Madhura Bhave

commit sha 8bce2704454dfa07fce785ba6e51714c3942b236

Merge pull request #19202 from bono007 * pr/19202: Polish "Verify ssl key alias on server startup" Verify ssl key alias on server startup Closes gh-19202

view details

Madhura Bhave

commit sha 98a657fedbd1f16e14cce727bb354f8cdcc18d4d

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

view details

Madhura Bhave

commit sha 8d9b1d29886985b476f9614f8e524867cdb25d76

Merge branch '2.2.x' Closes gh-20133

view details

push time in 11 days

issue closedspring-projects/spring-boot

Verify ssl key alias on server startup

Forward port of issue #19202 to 2.3.0.M2.

closed time in 11 days

mbhave

issue closedspring-projects/spring-boot

Verify ssl key alias on server startup

Forward port of issue #19202 to 2.2.5.

closed time in 11 days

mbhave

PR closed spring-projects/spring-boot

Verify ssl key alias on server startup type: bug

If there is an invalid ssl.server.key-alias specified (one that does not exist in the keystore) then the server will not startup.

Closes gh-16168

NOTE Code was added to Netty, Tomcat, and Jetty but not to Tomcat as it already fails to startup in this case. I was going to add the code anyways so they all failed in the same manner but it became problematic getting a key store prior to the server starting up. I went ahead and left it alone.

NOTE Integration test cover each server in this scenario and I also verified all 4 servers manually in another consuming app.

+256 -13

4 comments

10 changed files

bono007

pr closed time in 11 days

issue openedspring-projects/spring-boot

Verify ssl key alias on server startup

Forward port of issue #19202 to 2.3.0.M2.

created time in 11 days

push eventspring-projects/spring-boot

cbono

commit sha e3516059622a09ea2ff439daffaeb87c649d9667

Verify ssl key alias on server startup See gh-19202

view details

Madhura Bhave

commit sha ac91f14f05ccf7d2198f6e313f03a5c73cc1c296

Polish "Verify ssl key alias on server startup" See gh-19202

view details

Madhura Bhave

commit sha 8bce2704454dfa07fce785ba6e51714c3942b236

Merge pull request #19202 from bono007 * pr/19202: Polish "Verify ssl key alias on server startup" Verify ssl key alias on server startup Closes gh-19202

view details

Madhura Bhave

commit sha 98a657fedbd1f16e14cce727bb354f8cdcc18d4d

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

view details

push time in 11 days

issue openedspring-projects/spring-boot

Verify ssl key alias on server startup

Forward port of issue #19202 to 2.2.5.

created time in 11 days

push eventspring-projects/spring-boot

cbono

commit sha e3516059622a09ea2ff439daffaeb87c649d9667

Verify ssl key alias on server startup See gh-19202

view details

Madhura Bhave

commit sha ac91f14f05ccf7d2198f6e313f03a5c73cc1c296

Polish "Verify ssl key alias on server startup" See gh-19202

view details

Madhura Bhave

commit sha 8bce2704454dfa07fce785ba6e51714c3942b236

Merge pull request #19202 from bono007 * pr/19202: Polish "Verify ssl key alias on server startup" Verify ssl key alias on server startup Closes gh-19202

view details

push time in 11 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 747eab020de4e879cbd27e4bd1a2159693380537

Update copyright of changed files

view details

Madhura Bhave

commit sha 3bdd91a1190e378738c2ce32e4034bc251c3e588

Merge branch '2.1.x' into 2.2.x

view details

Madhura Bhave

commit sha a5a2d52ee3942f8a4acc8d2509d50f1566f8307e

Merge branch '2.2.x'

view details

push time in 11 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 747eab020de4e879cbd27e4bd1a2159693380537

Update copyright of changed files

view details

Madhura Bhave

commit sha 3bdd91a1190e378738c2ce32e4034bc251c3e588

Merge branch '2.1.x' into 2.2.x

view details

push time in 11 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 747eab020de4e879cbd27e4bd1a2159693380537

Update copyright of changed files

view details

push time in 11 days

pull request commentspring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment

@schulzh Thank you for making your first contribution to Spring Boot. This has now been merged along with this addition.

schulzh

comment created time in 11 days

push eventspring-projects/spring-boot

Hans Schulz

commit sha 6828a15d31ac7d1ca1bfd560cfa05c393b3b7128

Handle JSON keys containing a dot from CF environment as a single path segment See gh-18915

view details

Madhura Bhave

commit sha 544dca7f1b8a2adf7921f7c56b86f7abb8f37964

Polish contribution Along with surrounding map keys with dot from VCAP_SERVICES with `[ ]`, this commit also does that for non-alphanumeric and `-` characters so that they are not stripped off later. See gh-18915

view details

Madhura Bhave

commit sha 3917968d2acb67fce6b82eab770f0c74b9f11b6b

Merge pull request #18915 from schulzh * pr/18915: Polish contribution Handle JSON keys containing a dot from CF environment as a single path segment Closes gh-18915

view details

Madhura Bhave

commit sha d1c76995394521760eddada276958a3eb7da69bd

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

view details

Madhura Bhave

commit sha c5ffe198afe53b18efa23f78d02c8238a5f39aec

Merge branch '2.2.x' Closes gh-20130

view details

push time in 12 days

issue closedspring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment

Forward port of issue #18915 to 2.3.0.M2.

closed time in 12 days

mbhave

issue closedspring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment

Forward port of issue #18915 to 2.2.5.

closed time in 12 days

mbhave

PR closed spring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment status: waiting-for-feedback type: bug

This PR changes the handling of JSON keys in the CloudFoundry VCAP_SERVICES environment variable so that they represent only a single path segment at a time.

Before this change, if the JSON contained an object key with dots, the key would be treated as individual path segments, instead of a single one. E.g. the VCAP_SERVICES variable

{
  "user-provided": [
    {
      "name": "test",
      "label": "test-label",
      "credentials": {
        "key.with.dots": {
          "username": "foo",
          "password": "bar"
        }
      }
    }
  ]
}

Would lead to the spring property: vcap.services.test.credentials.key.with.dots.username=foo Instead of the escaped version: vcap.services.test.credentials[key.with.dots].username=foo

This causes problems e.g. when trying to bind these properties to a map, as it would not be filled with any values:

@ConfigurationProperties("vcap.services.test")
public class CfEnvCredentials {
    public final Map<String, BasicAuthentication> credentials;
    [...]
}
+13 -0

5 comments

2 changed files

schulzh

pr closed time in 12 days

issue openedspring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment

Forward port of issue #18915 to 2.3.0.M2.

created time in 12 days

push eventspring-projects/spring-boot

Hans Schulz

commit sha 6828a15d31ac7d1ca1bfd560cfa05c393b3b7128

Handle JSON keys containing a dot from CF environment as a single path segment See gh-18915

view details

Madhura Bhave

commit sha 544dca7f1b8a2adf7921f7c56b86f7abb8f37964

Polish contribution Along with surrounding map keys with dot from VCAP_SERVICES with `[ ]`, this commit also does that for non-alphanumeric and `-` characters so that they are not stripped off later. See gh-18915

view details

Madhura Bhave

commit sha 3917968d2acb67fce6b82eab770f0c74b9f11b6b

Merge pull request #18915 from schulzh * pr/18915: Polish contribution Handle JSON keys containing a dot from CF environment as a single path segment Closes gh-18915

view details

Madhura Bhave

commit sha d1c76995394521760eddada276958a3eb7da69bd

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

view details

push time in 12 days

issue openedspring-projects/spring-boot

Handle JSON keys containing a dot from CF environment as a single path segment

Forward port of issue #18915 to 2.2.5.

created time in 12 days

push eventspring-projects/spring-boot

Hans Schulz

commit sha 6828a15d31ac7d1ca1bfd560cfa05c393b3b7128

Handle JSON keys containing a dot from CF environment as a single path segment See gh-18915

view details

Madhura Bhave

commit sha 544dca7f1b8a2adf7921f7c56b86f7abb8f37964

Polish contribution Along with surrounding map keys with dot from VCAP_SERVICES with `[ ]`, this commit also does that for non-alphanumeric and `-` characters so that they are not stripped off later. See gh-18915

view details

Madhura Bhave

commit sha 3917968d2acb67fce6b82eab770f0c74b9f11b6b

Merge pull request #18915 from schulzh * pr/18915: Polish contribution Handle JSON keys containing a dot from CF environment as a single path segment Closes gh-18915

view details

push time in 12 days

issue commentspring-projects/spring-boot

Binding to collection fails with unbound elements error if collection overridden in another property source

@anatoliy-balakirev I think Stephane is talking about these comments he added to your sample.

mschallar

comment created time in 12 days

issue commentspring-projects/spring-boot

Actuator triggers an early post processor initialization

Wonder if this is related to #19625.

cubita-io

comment created time in 12 days

issue commentspring-projects/spring-boot

Command-Line Arguments broken in 2.2.4? or Am I using it in wrong way?

This should work for you

mvn spring-boot:run -Dspring-boot.run.arguments="--SEQUENCE_NO=1 --spring.profiles.active=zone1"

If you have any other questions, please join us on Gitter.

vmisra2018

comment created time in 12 days

issue closedspring-projects/spring-boot

Command-Line Arguments broken in 2.2.4? or Am I using it in wrong way?

I have a bootstrap.yml file which has placeholders but it seems when I use springboot 2.2.4 .RELEASE, it does not pick up those placeholders but same code works successfully for 2.2.2 RELEASE Also , the placeholder as number gives throws java.lang.NumberFormatException for 2.2,4.RELASE. Although I have spring clould version Hoxton.SR1 but it looks more of a springboot issue (?) .

When I run as spring boot ,I am passing multiple command line arguments

mvn spring-boot:run -Dspring-boot.run.arguments=--SEQUENCE_NO=1,--spring.profiles.active=zone1

bootstrap.yml

---
spring:
  application:
    name: dummy-service
  profiles: zone1
  cloud:
    config:
      uri: http://localhost:8890
      fail-fast: true
      profile: sit
eureka:
  instance:
    instanceId: ${spring.cloud.client.hostname}:${spring.application.name}:${server.port}
    prefer-ip-address: true
    metadataMap:
      zone: zone1
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
server:
  port: ${PORT:1100${SEQUENCE_NO}}
---
spring:
  application:
    name: dummy-service
  profiles: zone1
  cloud:
    config:
      uri: http://localhost:8890
      fail-fast: true
      profile: sit
eureka:
  instance:
    instanceId: ${spring.cloud.client.hostname}:${spring.application.name}:${server.port}
    prefer-ip-address: true
    metadataMap:
      zone: zone1
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
server:
  port: ${PORT:1100${SEQUENCE_NO}}
---
spring:
  application:
    name: dummy-service
  profiles: zone2
  cloud:
    config:
      uri: http://localhost:8890
      fail-fast: true
      profile: sit
eureka:
  instance:
    instanceId: ${spring.cloud.client.hostname}:${spring.application.name}:${server.port}
    prefer-ip-address: true
    metadataMap:
      zone: zone1
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka/
server:
  port: ${PORT:1100${SEQUENCE_NO}}







Output when I run with 2.2.4.RELEASE :

Caused by: java.lang.NumberFormatException: For input string: "11001,--spring.profiles.active=zone1"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[na:1.8.0_232]
        at java.lang.Integer.parseInt(Integer.java:580) ~[na:1.8.0_232]
        at java.lang.Integer.valueOf(Integer.java:766) ~[na:1.8.0_232]
        at org.springframework.util.NumberUtils.parseNumber(NumberUtils.java:211) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]
        at org.springframework.core.convert.support.StringToNumberConverterFactory$StringToNumber.convert(StringToNumberConverterFactory.java:62) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE]

If I hardcode the ports to 11001 and 11002,it always picks up the second entry and starts on port 11002 I tried to print put arguments in my code


@SpringBootApplication
@EnableDiscoveryClient
public class DummyServiceApplication implements ApplicationRunner {
    //public class DummyServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(DummyServiceApplication.class, args);
    }

    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("Command-line arguments: {}" + Arrays.toString(args.getSourceArgs()));
        System.out.println("Non Option Args: {}" + args.getNonOptionArgs());
        System.out.println("Option Names: {}" + args.getOptionNames());

        for (String name : args.getOptionNames()) {
            System.out.println("arg-" + name + "=" + args.getOptionValues(name));
        }
    }

}

And I see this in logs

Command-line arguments: {}[--SEQUENCE_NO=1,--spring.profiles.active=zone1]
Non Option Args: {}[]
Option Names: {}[SEQUENCE_NO]
arg-SEQUENCE_NO=[1,--spring.profiles.active=zone1]

But with 2.2.2.RELEASE , it works and properly identities and starts on proper ports

Command-line arguments: {}[--SEQUENCE_NO=1, --spring.profiles.active=zone1]
Non Option Args: {}[]
Option Names: {}[SEQUENCE_NO, spring.profiles.active]
arg-SEQUENCE_NO=[1]
arg-spring.profiles.active=[zone1]

closed time in 12 days

vmisra2018

issue commentspring-projects/spring-boot

Command-Line Arguments broken in 2.2.4? or Am I using it in wrong way?

This looks like a duplicate of #19998. Please see this comment on how to pass multiple arguments on the command-line.

vmisra2018

comment created time in 12 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha d485708f6814df433aae6b72a97a0fbaa1a60513

Fix 404 when composite contributor is added to a group Fixes gh-19974

view details

Madhura Bhave

commit sha 19b7dc8e4f7381f7b7f532454c809cd99b0c6bc6

Merge branch '2.2.x' Closes gh-20114

view details

push time in 12 days

issue closedspring-projects/spring-boot

Health group with composite contributor results in 404

Forward port of issue #19974 to 2.3.0.M2.

closed time in 12 days

mbhave

issue closedspring-projects/spring-boot

Health group with composite contributor results in 404

I would like the ability to assign a CompositeHealthContributor to a Health Group via configuration.

Currently, the management.endpoint.health.group.<groupId>.include/exclude properties only accept health indicator ids. They do not accept the id of a CompositeHealthContributor.

Concrete use case: In my application, I have exposed a CompositeHealthContributor bean, composed of dynamically created HealthIndicators, with dynamically created indicator ids. Spring boot autoconfiguration will automatically discover the CompositeHealthContributor and add it to the system health checks. This is great. However, I want to be able to add this contributor to a health group by the composite contributor id. I cannot configure the health group to include the health indicator ids, since the health indicator ids are dynamically created.

I have attached an example application that has a failing unit test that demonstrates the problem.

The example application has the following property configuration:

management.endpoint.health.show-details=always
management.endpoint.health.group.foo.include=foo

With the following bean configuration:

	/*
	 * An example health contributor named "foo".
	 * (note the HealthContributorNameFactory will strip the HealthContributor bean name suffix)
	 */
	@Bean
	public CompositeHealthContributor fooHealthContributor() {
		return CompositeHealthContributor.fromMap(Map.<String, HealthIndicator>of(
			// Pretend this is dynamically created
			"foo-A", () -> Health.up().build(),
			"foo-B", () -> Health.up().build()));
	}

The /actuator/heath endpoint returns the following (as expected):

{
  "status": "UP",
  "components": {
    "diskSpace": {
      "status": "UP",
      "details": {
        "total": 791643418624,
        "free": 399057661952,
        "threshold": 10485760
      }
    },
    "foo": {
      "status": "UP",
      "components": {
        "foo-A": {
          "status": "UP"
        },
        "foo-B": {
          "status": "UP"
        }
      }
    },
    "ping": {
      "status": "UP"
    }
  },
  "groups": [
    "foo"
  ]
}

However, the /actuator/health/foo endpoint returns a 404, because the "foo" CompositeHealthContributor id is not included in the foo health group.

If I change management.endpoint.health.group.foo.include to foo,foo-A,foo-B, the foo group will work. However, I cannot statically configure the individual indicator ids, since they will be dynamically created.

As an alternative, if the include/exclude properties accepted a regex (rather than only * or an exact match) , I could finagle the dynamic ids to always be able to be matched by a regex.

closed time in 12 days

philsttr

push eventspring-projects/spring-boot

Madhura Bhave

commit sha d485708f6814df433aae6b72a97a0fbaa1a60513

Fix 404 when composite contributor is added to a group Fixes gh-19974

view details

push time in 12 days

issue openedspring-projects/spring-boot

Health group with composite contributor results in 404

Forward port of issue #19974 to 2.3.0.M2.

created time in 12 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha ec42dcd1739317d94359f6a25038ec0cf369fe3d

Fix typo

view details

push time in 12 days

create barnchmbhave/spring-boot

branch : gh-19866

created branch time in 15 days

issue closedspring-projects/spring-boot

spring.ftl spring.messageArgs doesn't work properly in freemarker

In messages.properties I have this property: welcome.message=Welcome {0}. {1} {2} and in hello.ftl I try to parse this property as below: <#import "/spring.ftl" as spring/> <@spring.message code="welcome.message" args="'Mr','Ahmed','Abed'"/> and the result is: Welcome {0}. {1} {2}

I have make workaround in hello.ftl as below: ${springMacroRequestContext.getMessage("welcome.message",['Mr','Ahmed','Abed'],"testtesttest",false)} and the result print correctly: Welcome Mr. Ahmed Abed

Can you please take a look? thanks.

closed time in 15 days

ahmedGazieAbed

issue commentspring-projects/spring-boot

spring.ftl spring.messageArgs doesn't work properly in freemarker

<@spring.messageArgs code="welcome.message" args=["Mr", "A", "B"]/>

@ahmedGazieAbed The above worked for me. I don't think specifying it without the [ ] syntax works but if you think you've found a bug please raise it in the Spring Framework issues tracker.

ahmedGazieAbed

comment created time in 15 days

pull request commentspring-projects/spring-boot

Add 'uris', 'address' and 'addresses' to keys to sanitize.

Thanks @bono007. This has now been merged into master.

bono007

comment created time in 16 days

push eventspring-projects/spring-boot

cbono

commit sha badc83d368f7c8a67c76ebcf1ea2f5659dda05c4

Add 'uris', 'address' and 'addresses' to keys to sanitize. See gh-19999

view details

Madhura Bhave

commit sha acc453db4a28bf4c7d815f26f1b60aad7b618945

Polish contribution See gh-19999

view details

Madhura Bhave

commit sha 37575d78bf9cdf1d3ed3cac4080b2c2ba402da28

Merge pull request #19999 from bono007 * pr/19999: Polish contribution Add 'uris', 'address' and 'addresses' to keys to sanitize. Closes gh-19999

view details

Madhura Bhave

commit sha eeab9233ccdb23a5bbb2c0a1b79131c534f0d6c5

Merge branch '2.2.x' Closes gh-20056

view details

push time in 16 days

issue closedspring-projects/spring-boot

Add 'uris', 'address' and 'addresses' to keys to sanitize.

Forward port of issue #19999 to 2.3.0.M2.

closed time in 16 days

mbhave

PR closed spring-projects/spring-boot

Add 'uris', 'address' and 'addresses' to keys to sanitize. type: bug

Closes gh-19626

+117 -21

0 comment

4 changed files

bono007

pr closed time in 16 days

issue openedspring-projects/spring-boot

Add 'uris', 'address' and 'addresses' to keys to sanitize.

Forward port of issue #19999 to 2.3.0.M2.

created time in 16 days

push eventspring-projects/spring-boot

cbono

commit sha badc83d368f7c8a67c76ebcf1ea2f5659dda05c4

Add 'uris', 'address' and 'addresses' to keys to sanitize. See gh-19999

view details

Madhura Bhave

commit sha acc453db4a28bf4c7d815f26f1b60aad7b618945

Polish contribution See gh-19999

view details

Madhura Bhave

commit sha 37575d78bf9cdf1d3ed3cac4080b2c2ba402da28

Merge pull request #19999 from bono007 * pr/19999: Polish contribution Add 'uris', 'address' and 'addresses' to keys to sanitize. Closes gh-19999

view details

push time in 16 days

issue commentspring-io/spring-javaformat

Automatic publishing to Gradle's Plugin repository isn't working

Probably because the BINTRAY_USERNAME and BINTRAY_API_KEY are not available as params to the promote task.

wilkinsona

comment created time in 17 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 9382cd4db13fc1b50a34d698c9e48dd8179a2048

Polish wildcard location documentation

view details

push time in 18 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 3f9d0058adebb02db74e5ad3433c872122fd32c6

Document new Docker-related features Closes gh-19868

view details

push time in 18 days

issue closedspring-projects/spring-boot

Document new Docker-related features

<!-- 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 -->

closed time in 18 days

philwebb

push eventspring-projects/spring-boot

Madhura Bhave

commit sha 0a377647cadad9e6ee52f2d4aab420974075f56c

Import OAuth2 auto-configurations in web slice tests Fixes gh-19823

view details

push time in 19 days

issue closedspring-projects/spring-boot

OAuth2 request parameter binding not available in @WebMvcTest

Here's a @Controller mapping, like one in the Spring Security samples:

@Controller
class OAuth2LoginController {

	@GetMapping("/")
	public String index(Model model, @RegisteredOAuth2AuthorizedClient OAuth2AuthorizedClient authorizedClient,
			@AuthenticationPrincipal OAuth2User oauth2User) {
...

The handler method params cannot be bound in a @WebMvcTest:

@WebMvcTest(OAuth2LoginController.class)
class DemoApplicationTests {

	@Autowired
	MockMvc mvc;

	@Test
	public void rootWhenAuthenticatedReturnsUserAndClient() throws Exception {
		this.mvc.perform(get("/").with(oauth2Login()))
			.andExpect(model().attribute("userName", "test-subject"))
			.andExpect(model().attribute("clientName", "test"))
			.andExpect(model().attribute("userAttributes", Collections.singletonMap("sub", "test-subject")));
	}

}

unless you manually add 2 beans that in the app (not in the test) are added via autoconfiguration:

	@MockBean
	ClientRegistrationRepository clientRegistrationRepository;

	@TestConfiguration
	static class AuthorizedClient {
		@Bean
		public OAuth2AuthorizedClientRepository authorizedClientRepository() {
			return new HttpSessionOAuth2AuthorizedClientRepository();
		}
	}

Seems like maybe spring-boot-test-autoconfigure is missing something in spring.factories?

There's a sample app here: https://github.com/spring-projects/spring-security/blob/master/samples/boot/oauth2login/src/test/java/sample/web/OAuth2LoginControllerTests.java

closed time in 19 days

dsyer

push eventspring-projects/spring-boot

Madhura Bhave

commit sha e64a145ef0b0ac3a3bf97c41cff67af519ee6a71

Add support for wildcard locations for properties and YAML files Closes gh-19909

view details

push time in 20 days

issue closedspring-projects/spring-boot

RabbitProperties addresses field is not sanitized by default and may contain sensitive information

Problem:

The actuator configprops and env endpoints show RabbitProperties#addresses in un-sanitized form.

Workaround:

These endpoints expose the keys-to-sanitize property and I could set that property to the current defaults plus addresses. However, this is not desirable as

  1. we have many applications that will use this and will have to do this in every app (or write a starter that does it).
  2. copying the current default values in the endpoint code is a risk of getting out of sync w/ that code (defaults in the endpoint).

It feels like this is something that should be handled out-of-box.

Couple of options:

  1. Update default keys-to-sanitize to include an expression for addresses.

  2. Add an additional-keys-to-sanitize to allow adds to the defaults and set that property in my applications.

  3. Add an annotation that can be set on a @ConfigurationProperties field (such as @Sensitive) that would automatically get that field excluded from the endpoint reports.

  4. Do nothing. Use the existing keys-to-sanitize property w/ the current coded defaults and add addresses to it. Repeat this in each application. Update each application when/if the defaults happen to change in the endpoint code.

I am happy to submit a merge request for any of these options.

closed time in 20 days

bono007

issue commentspring-projects/spring-boot

RabbitProperties addresses field is not sanitized by default and may contain sensitive information

It was fixed in 2.2.x actually. I've moved the issue to 2.2.x.

bono007

comment created time in 23 days

issue commentspring-projects/spring-boot

RabbitProperties addresses field is not sanitized by default and may contain sensitive information

@bono007 A PR would be most welcome, thank you.

bono007

comment created time in 23 days

push eventspring-projects/spring-boot

Madhura Bhave

commit sha bceed1305f891214ae703dcfbbded5df60d5138c

Jar files added after build time should be added to classpath Fixes gh-19973

view details

push time in 23 days

issue closedspring-projects/spring-boot

Jar files added after build time are not loaded

The Cloud Foundry Java Buildpack adds jar files to a container while staging the application for running on CF. With Boot 2.3.0, these added jar files are not loaded when the application is started using the Spring Boot launcher, likely because they are not in the classpath index file that is generated with the fat jar that is typically exploded and sent to CF.

This causes Java Buildpack features like Spring Auto Reconfiguration, Client Certificate Mapper, Container Security Provider, MariaDB JDBC, and PostgreSQL JDBC to not work with Boot 2.3.0.

closed time in 23 days

scottfrederick

issue openedspring-projects/spring-boot

Add support for creating property sources from volume-mounted Kubernetes ConfigMaps and Secrets

This issue addresses the case where configmaps are not mounted as as an application.properties (or yml) file. For secrets, we need to consider things like if the secret changes, what happens to configuration that has been created using that secret.

created time in 24 days

issue commentspring-projects/spring-boot

RabbitProperties addresses field is not sanitized by default and may contain sensitive information

We've decided to add addresses, address and uris to list of keys to sanitize. As part of this issue, we should also do a sweep of all our @ConfigurationProperties to make sure we aren't missing any.

bono007

comment created time in 24 days

PR closed spring-projects/spring-boot

Support multi disk space for: merge-with-amendments type: enhancement

<!-- Thanks for contributing to Spring Boot. Please review the following notes before submitting you pull request.

Security Vulnerabilities

STOP! If your contribution fixes a security vulnerability, please do not submit it. Instead, please head over to https://pivotal.io/security to learn how to disclose a vulnerability responsibly.

Dependency Upgrades

Please do not open a pull request for a straightforward dependency upgrade (one that only updates the version property). We have a semi-automated process for such upgrades that we prefer to use. However, if the upgrade is more involved (such as requiring changes for removed or deprecated API) your pull request is most welcome.

Describing Your Changes

If, having reviewed the notes above, you're ready to submit your pull request, please provide a brief description of the proposed changes. If they fix a bug, please describe the broken behaviour and how the changes fix it. If they make an enhancement, please describe the new functionality and why you believe it's useful. If your pull request relates to any existing issues, please reference them by using the issue number prefixed with #. -->

+86 -33

8 comments

4 changed files

polarbear567

pr closed time in 24 days

pull request commentspring-projects/spring-boot

Support multi disk space

@polarbear567 Thank you for your work on this PR. We discussed this at length on our team call and it appears that there isn't a good way to support this without making a breaking change. The total, free and threshold keys at the top level do not really mean anything when multiple paths are configured. Those cannot always represent the root path because the user might have configured management.health.diskspace.path to a different value and might not want the root path to contribute to the health status.

Given that this isn't a widely requested feature, we don't think it justifies a breaking change at this time. I'll leave the original issue open so that we can consider it in the future. Thanks again.

polarbear567

comment created time in 24 days

create barnchmbhave/spring-boot

branch : gh-19973

created branch time in 24 days

issue commentspring-projects/spring-boot

OAuth2 request parameter binding not available in @WebMvcTest

Makes sense to me. I think we need to add OAuth2ClientAutoConfiguration (and the reactive equivalent) to spring.factories. Wonder if we should also do this for OAuth2ResourceServerAutoConfiguration.

dsyer

comment created time in 25 days

more