Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

mueller-jens
Copy link
Contributor

@mueller-jens mueller-jens commented Mar 7, 2023

…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
Copy link
Member

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

@MikeEdgar MikeEdgar force-pushed the set_@PropertyResource_to_fix_file_for_all_classes branch from 9b89048 to 5d473d7 Compare March 14, 2023 13:35
@mueller-jens
Copy link
Contributor Author

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

@MikeEdgar
Copy link
Member

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 😄

The PR is generally looking pretty good.

Jens Müller and others added 2 commits March 14, 2023 19:18
…ange te actual behavior; adjust test classes to work with not english locale and not linux systems
Signed-off-by: Michael Edgar <michael@xlate.io>
@MikeEdgar MikeEdgar force-pushed the set_@PropertyResource_to_fix_file_for_all_classes branch from 05ceb09 to 2ed45ab Compare March 14, 2023 23:18
Copy link
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a few small items identified by the sonar scanner.

src/main/java/io/xlate/inject/PropertyFactory.java Outdated Show resolved Hide resolved
src/main/java/io/xlate/inject/PropertyProducerBean.java Outdated Show resolved Hide resolved
src/main/java/io/xlate/inject/PropertyFactory.java Outdated Show resolved Hide resolved
mueller-jens and others added 4 commits March 15, 2023 17:55
Co-authored-by: Michael Edgar <michael@xlate.io>
Co-authored-by: Michael Edgar <michael@xlate.io>
Co-authored-by: Michael Edgar <michael@xlate.io>
Co-authored-by: Michael Edgar <michael@xlate.io>
@mueller-jens
Copy link
Contributor Author

Hi @MikeEdgar, have applied your suggestions.

@sonarqubecloud
Copy link

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

Copy link
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, any other updates on your side @mueller-jens ?

@mueller-jens
Copy link
Contributor Author

LGTM

No futher updates at the moment.

@MikeEdgar MikeEdgar merged commit f0b0d49 into xlate:master Mar 19, 2023
@MikeEdgar MikeEdgar linked an issue Feb 6, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

set @PropertyResource to fix file for all classes
2 participants