xlate / property-inject

Simple CDI extension to support injection of java.util.Properties values
GNU Affero General Public License v3.0
11 stars 8 forks source link

add the possibility to have a property file for all classes by not ch… #117

Closed mueller-jens closed 1 year ago

mueller-jens commented 1 year ago

…ange te actual behavior; adjust test classes to work with not english locale and not linux systems

Here an purposal to solve my requirement to have a global propertyfile, whithout touching the old behavior and the possiblilty to override the values locally.

To configure a global propertyfile the user has to implement a bean like this example:

package io.xlate.inject;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Default;

@ApplicationScoped
@Default
public class #TestFileProvider implements PropertyFileProvider {

    @Override
    public String getLocation() {
        return "classpath:global.properties";
    }

}

Also I have adapted some tests to work also on system with different locale than english and the file resolver to use it in windows environment too.

MikeEdgar commented 1 year ago

Thanks for the PR @mueller-jens . I'll review this soon

mueller-jens commented 1 year ago

Hi @MikeEdgar, give me a hint if I should clean something up or if i can help you in an other way.

MikeEdgar commented 1 year ago

Thanks @mueller-jens , I was trying to get the CI working. I hadn't updated the build and quality analysis on this repo in a while, so it's taking a bit longer :smile:

The PR is generally looking pretty good.

mueller-jens commented 1 year ago

Hi @MikeEdgar, have applied your suggestions.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

86.0% 86.0% Coverage
0.0% 0.0% Duplication

mueller-jens commented 1 year ago

LGTM

No futher updates at the moment.