question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

optional: prefix doesn't work

See original GitHub issue

Hi,

I tried to add optional: prefix then I got:

15:42:35.672 [restartedMain] DEBUG org.springframework.boot.diagnostics.FailureAnalyzers - FailureAnalyzer org.springframework.boot.liquibase.LiquibaseChangelogMissingFailureAnalyzer@a8f041f failed
java.lang.NoClassDefFoundError: liquibase/exception/ChangeLogParseException
...

application.yml:

spring:
  config:
    import: "optional:consul:${spring.cloud.consul.host}:${spring.cloud.consul.port}/dev"

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
spencergibbcommented, Jan 27, 2021

I get the following with optional

2021-01-27 14:37:05.482 TRACE 197399 --- [           main] o.s.b.context.config.ConfigDataLoaders   : Loading [ConsulConfigDataResource@55cb6996 context = '/config/appname_test/', optional = true, properties = [ConsulConfigProperties@1807e3f6 enabled = true, prefix = 'config', defaultContext = 'application', profileSeparator = ',', format = KEY_VALUE, dataKey = 'data', aclToken = [null], watch = [ConsulConfigProperties.Watch@480d3575 waitTime = 55, enabled = true, delay = 1000], failFast = true, name = 'demo']] using loader org.springframework.cloud.consul.config.ConsulConfigDataLoader
2021-01-27 14:37:05.482 TRACE 197399 --- [           main] o.s.b.context.config.ConfigDataImporter  : Ignoring missing config data resource '[ConsulConfigDataResource@55cb6996 context = '/config/appname_test/', optional = true, properties = [ConsulConfigProperties@1807e3f6 enabled = true, prefix = 'config', defaultContext = 'application', profileSeparator = ',', format = KEY_VALUE, dataKey = 'data', aclToken = [null], watch = [ConsulConfigProperties.Watch@480d3575 waitTime = 55, enabled = true, delay = 1000], failFast = true, name = 'demo']]' via location 'optional:consul:localhost:8500/config/appname_test'

This may have been fixed with #693

1reaction
spencergibbcommented, Jan 5, 2021

Optional is a spring boot feature. It doesn’t matter if it’s consul or not

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regex with optional prefix - Stack Overflow
since it doesn't backtrack. ... Run code snippet. Hide results ... Should work by just adding the dot to the first group in...
Read more >
Optional chaining on prefix operators - Swift Forums
You can't do this with infix operators either; a? + b doesn't work for a: Int? and b: Int . IMO, ( ...
Read more >
Aligning text in a list (with an optional prefix in the first line) - TeX
I have a list, where each item can consist of one or more paragraphs. In addition, the paragraphs can be optionally marked with...
Read more >
SAP CallTransaction with Optional /n Prefix - UiPath Forum
I tried to use the option /o, to open a new session, but it doesn't work. image. Sure, this will then also become...
Read more >
Custom Prefixes for Amazon S3 Objects
If you specify a prefix that doesn't contain a timestamp namespace expression, Kinesis Data Firehose appends the expression !{timestamp:yyyy/MM/dd/HH/} to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found