Git Product home page Git Product logo

config-builder's People

Contributors

aaschmid avatar actions-user avatar awallat avatar bmatthias avatar boidolr avatar fdw avatar greimela avatar hankem avatar janschaefer avatar joshovi avatar renovate-bot avatar renovate[bot] avatar theone1984 avatar wuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

config-builder's Issues

Multi config

It would be nice to have "namespaces" for properties so I can get multiple configs from one properties file, command line, etc.

CLI parser exceptions are not mapped to a message

A null pointer exception occurs when passing in invalid command line options like

--help

This is due to the fact that there is no error message for CLIParseException in the error message setup.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • actions/setup-java v4
  • actions/checkout v4
  • codecov/codecov-action v4
  • actions/checkout v4
maven
pom.xml
  • org.apache.maven.plugins:maven-release-plugin 3.1.1
  • org.sonatype.plugins:nexus-staging-maven-plugin 1.7.0
  • org.apache.maven.plugins:maven-compiler-plugin 3.13.0
  • org.jacoco:jacoco-maven-plugin 0.8.12
  • org.apache.maven.plugins:maven-surefire-plugin 3.3.1
  • org.apache.maven.plugins:maven-source-plugin 3.3.1
  • org.apache.maven.plugins:maven-javadoc-plugin 3.8.0
  • org.owasp:dependency-check-maven 10.0.3
  • org.apache.maven.plugins:maven-gpg-plugin 3.2.5
  • commons-cli:commons-cli 1.8.0
  • com.google.guava:guava 33.2.1-jre
  • org.hibernate.validator:hibernate-validator 6.2.5.Final
  • org.glassfish:jakarta.el 3.0.4
  • com.tngtech.java:property-loader 1.5.1
  • org.reflections:reflections 0.10.2
  • org.slf4j:slf4j-api 2.0.16
  • org.assertj:assertj-core 3.26.3
  • org.junit.jupiter:junit-jupiter 5.10.3
  • org.mockito:mockito-junit-jupiter 4.11.0
  • org.slf4j:slf4j-reload4j 2.0.16
maven-wrapper
.mvn/wrapper/maven-wrapper.properties
  • maven 3.9.8

  • Check this box to trigger a request for Renovate to run again on this repository

Primitive data types are not merged correctly

When using this config value for example

  @DefaultValue("true")
  private boolean headlessMode;

and merging with an existing config where the value is set to "false" explicitly, the value is set to "true" (which is not correct).

Better Java8 compatibility

I've been using the config-builder within a project that uses PowerMock in the unit tests. With Java7 everything went fine, but when I switched to Java8 I received an exception ("java.lang.IllegalStateException: Failed to transform class with name ... ") during test initialization. I found out that I needed the latest javassist library to run my tests again with Java8.

Since the reflections-library depends on javassist it was enough to set the version from 0.9.8 to 0.9.9-RC2 (in maven-dependency-management), which contains the dependency to the latest javassist lib.

So it's just a recommendation to update the lib. Since I believe that there might be more incompatibilities when people work with Java8, it would make life easier for them, especially when they don't have to waste their time finding the solution.

Cheers!

gh-pages are outdated

There are several issues with our gh-pages:

  • the presentation is extremely outdated, it should likely bre removed altogether in favor of an up-to-date documentation directly in README.md or a GH Wiki page
  • The JavaDoc website, while helpful, was set up a very long time ago. It should at least be upgraded to proper TLS1.3 support

Add custom command line options

New command line options cannot be added externally, so you cannot provide a custom command line switch like

--help

at the moment.

Allow escaping of ${} expressions

I have a problem where I need to have an expression containing ${} in my config file (for a camel endpoint). Unfortunately I got the following exception:

Caused by: com.tngtech.propertyloader.impl.filters.VariableResolvingFilterException: Error during variable resolution: No value found for variable file:name
    at com.tngtech.propertyloader.impl.filters.VariableResolvingFilter.filterValue(VariableResolvingFilter.java:27)
    at com.tngtech.propertyloader.impl.filters.ValueModifyingFilter.filter(ValueModifyingFilter.java:15)
    at com.tngtech.propertyloader.PropertyLoader.filterProperties(PropertyLoader.java:277)
    at com.tngtech.propertyloader.PropertyLoader.load(PropertyLoader.java:230)
    at com.tngtech.configbuilder.ConfigBuilder.setupBuilderConfiguration(ConfigBuilder.java:144)
    at com.tngtech.configbuilder.ConfigBuilder.build(ConfigBuilder.java:133)
    ... 20 more

It would be awesome if I could escape the expression somehow =)

Trailing whitespace causes ConfigBuilder to fail

Assume you have an entry with trailing whitespace in a properties file which is supposed to be mapped to an integer field. The ConfigBuilder fails with the exception:

com.tngtech.configbuilder.exception.PrimitiveParsingException: unable to parse "42 " to int
at com.tngtech.configbuilder.annotation.typetransformer.StringOrPrimitiveToPrimitiveTransformer.transform(StringOrPrimitiveToPrimitiveTransformer.java:21)
at com.tngtech.configbuilder.util.FieldValueTransformer.performNecessaryTransformations(FieldValueTransformer.java:82)
at com.tngtech.configbuilder.util.FieldValueTransformer.transformFieldValue(FieldValueTransformer.java:45)
at com.tngtech.configbuilder.util.FieldSetter.setFields(FieldSetter.java:36)
at com.tngtech.configbuilder.ConfigBuilder.build(ConfigBuilder.java:265)

A way around this might be to call String.trim() in StringOrPrimitiveToPrimitiveTransformer.

Not buildable with Java 6 anymore

The project cannot be build anymore because it depends on Java 7. The only reason is the StringToPathTransformer class which requires the Path class that does not exist in Java 6. I suggest to remove that transformer.

proposal: build complex objects from more than one config value

The idea (thanks to @wolfs) is to enable creating complex transformers which can use more than one input, e.g. using the hierarchy of the property name:

Property-File content:

connection.a.host
connection.a.port
connection.a.user
connection.a.password

Java Config Class:

@ImportedValue('connection.a')
@TypeTransformers('MapToComplexObjectTransformer.class})
private ComplexObject connection;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.