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

Fix/861 config load exception when auditing service id #863

Merged
merged 3 commits into from
Dec 11, 2020

Conversation

BalloonWen
Copy link
Contributor

fixed issue when getJsonMapConfig

Bolun Wen added 2 commits December 10, 2020 23:42
- fixed issue when getting server config in AuditHandler by using getJsonMapConfigNoCache
@BalloonWen BalloonWen linked an issue Dec 11, 2020 that may be closed by this pull request
@jiachen1120
Copy link
Contributor

@BalloonWen Thanks for the quick fix!! Do you think it would be better to load the configuration when class initialize to prevent load server config for every requests?

for example load when construct audithandler?

public AuditHandler() {
        if (logger.isInfoEnabled()) logger.info("AuditHandler is loaded.");
        auditConfig = AuditConfig.load();
        serverConfig = // load no cache config here?
    }

@stevehu
Copy link
Contributor

stevehu commented Dec 11, 2020

@jiachen1120 I think that is a good idea as we are not using cache anymore. In the Http2Client, I am loading the server.yml in a static block.

@BalloonWen
Copy link
Contributor Author

@jiachen1120 good idea, @stevehu will do in this PR

@stevehu stevehu added 1.6.x Merge to 1.6.x Branch 2.0.x Merge to 2.0.x Branch labels Dec 11, 2020
- to avoid getting config per request, will get the service id when constructing the class
@stevehu stevehu merged commit 39a97b5 into master Dec 11, 2020
@stevehu stevehu deleted the fix/861-audit-serviceId branch December 11, 2020 20:20
stevehu pushed a commit that referenced this pull request Dec 11, 2020
* issue-861
- fixed issue when getting server config in AuditHandler by using getJsonMapConfigNoCache

* issue-861
- to avoid getting config per request, will get the service id when constructing the class

Co-authored-by: Bolun Wen <bolun.wen@sunlife.com>
@BalloonWen BalloonWen changed the title Fix/861 audit service Fix/861 config load exception when auditing service id Dec 14, 2020
younggwon1 pushed a commit to younggwon1/light-4j that referenced this pull request Feb 10, 2024
* issue-861
- fixed issue when getting server config in AuditHandler by using getJsonMapConfigNoCache

* issue-861
- to avoid getting config per request, will get the service id when constructing the class

Co-authored-by: Bolun Wen <bolun.wen@sunlife.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.6.x Merge to 1.6.x Branch 2.0.x Merge to 2.0.x Branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug when auditing service id
3 participants