Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

SpringBoot 2.0 can not use underscore with lower case letters #105

Closed
leizhiyuan opened this issue Oct 27, 2018 · 1 comment
Closed

SpringBoot 2.0 can not use underscore with lower case letters #105

leizhiyuan opened this issue Oct 27, 2018 · 1 comment
Milestone

Comments

@leizhiyuan
Copy link
Contributor

leizhiyuan commented Oct 27, 2018

Describe the bug

after upgrade to spring 2.0

com.alipay.sofa.rpc.boot.config.SofaBootRpcPropertiesTest#testUnderscoreConfig

this case will fail because spring boot 2.0 cannot use this style now.

https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-relaxed-binding

if we use os environment ,

we should use

"COM_ALIPAY_SOFA_RPC_BOLT_THREAD_POOL_MAX_SIZE=600"

but this is a compatible style ,we cannot change these settings of users。 so will it an incompatible change in this version?

or we can add

    private String getUnderScoreString(String enclosingMethodName) {
        if (environment == null) {
            return null;
        }
        return environment.getProperty(PREFIX + "_" + camelToUndre(enclosingMethodName.substring(3)));
    }

to achieve this?

Expected behavior

Actual behavior

Steps to reproduce

Minimal yet complete reproducer code (or GitHub URL to code)

Environment

  • Starter version: 3.0.0
  • JVM version (e.g. java -version):
  • OS version (e.g. uname -a):
  • Maven version:
  • IDE version:
@leizhiyuan leizhiyuan added this to the 3.0.0 milestone Oct 27, 2018
@QilongZhang
Copy link
Contributor

#104

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants