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

Migrate from Zalando to Spring Framework 6 problem support implementation #19991[skip-ci] #20080

Merged
merged 15 commits into from
Oct 30, 2022
Merged

Migrate from Zalando to Spring Framework 6 problem support implementation #19991[skip-ci] #20080

merged 15 commits into from
Oct 30, 2022

Conversation

dwarakaprasad
Copy link
Contributor

fixes #19991

Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@dwarakaprasad
Copy link
Contributor Author

@mraible this migration is complete except the exception cause part, out of the box Spring's Problem implementation doesn't seem to support this (at least I couldn't find any documentation) like zalando. I can try something similar to zalando by extending the base ProblemDetail class but have to look at how Spring handles the extended class during json conversion (with nesting)...
What are your thoughts?

@mraible
Copy link
Contributor

mraible commented Oct 22, 2022

You might try creating an extended problem detail class and adding cause to it, like this one does for host.

@dwarakaprasad
Copy link
Contributor Author

You might try creating an extended problem detail class and adding cause to it, like this one does for host

Yeah sure. thanks

@mraible
Copy link
Contributor

mraible commented Oct 27, 2022

The CI failures don't seem to be related to this PR. I'm not sure what's causing them.

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project jhipster-sample-application: Compilation failure
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/SecurityConfiguration.java:[49,17] method ignoringRequestMatchers in class org.springframework.security.config.annotation.web.configurers.CsrfConfigurer<H> cannot be applied to given types;
Error:    required: org.springframework.security.web.util.matcher.RequestMatcher[]
Error:    found:    java.lang.String
Error:    reason: varargs mismatch; java.lang.String cannot be converted to org.springframework.security.web.util.matcher.RequestMatcher
Error:  -> [Help 1]

@dwarakaprasad
Copy link
Contributor Author

dwarakaprasad commented Oct 29, 2022

The CI failures don't seem to be related to this PR. I'm not sure what's causing them.

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project jhipster-sample-application: Compilation failure
Error:  /home/runner/work/generator-jhipster/generator-jhipster/app/src/main/java/tech/jhipster/sample/config/SecurityConfiguration.java:[49,17] method ignoringRequestMatchers in class org.springframework.security.config.annotation.web.configurers.CsrfConfigurer<H> cannot be applied to given types;
Error:    required: org.springframework.security.web.util.matcher.RequestMatcher[]
Error:    found:    java.lang.String
Error:    reason: varargs mismatch; java.lang.String cannot be converted to org.springframework.security.web.util.matcher.RequestMatcher
Error:  -> [Help 1]

I have fixed SecurityConfiguration related to mvcMatcher along with 3 other test failures, hopefully that will fix this. Will be pushing the changes in a bit

1. add GET method for authenticate endpoint in SecurityConfiguration for JWT type
2. add rememberMe defaults to test property
3. add mvcHandlerMappingIntrospector bean for MockMvcResultMatchers support
4. MicroMeter fix for malformed jwt token
@dwarakaprasad dwarakaprasad marked this pull request as ready for review October 30, 2022 13:56
Copy link
Member

@mshima mshima left a comment

Choose a reason for hiding this comment

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

Great work.

.github/actions/setup/action.yml Outdated Show resolved Hide resolved
.github/actions/setup/action.yml Outdated Show resolved Hide resolved
@mshima mshima merged commit daacbd3 into jhipster:spring-boot-3.0-m4 Oct 30, 2022
@DanielFran DanielFran added this to the 8.0.0-beta.1 milestone Jun 9, 2023
@dwarakaprasad
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants