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

Finalize move to Spring Boot 3 / Jakarta EE namespace #198

Merged
merged 3 commits into from
Jan 9, 2023
Merged

Finalize move to Spring Boot 3 / Jakarta EE namespace #198

merged 3 commits into from
Jan 9, 2023

Conversation

ilgrosso
Copy link
Contributor

@ilgrosso ilgrosso commented Jan 2, 2023

  • Spring Security configuration upgraded (removal of WebSecurityConfigurerAdapter)
  • moved Spring autoconfiguration to their new place
  • import statements changed from javax.* to jakarta.*
  • Wicket upgraded to 10.0.0-M1-SNAPSHOT:
    • moved from CsrfPreventionRequestCycleListener to ResourceIsolationRequestCycleListener
    • wicket-bean-validation and wicket-devutils are not available from SNAPSHOT repositories
    • the org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow class seems to be missing

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 2, 2023

The sources are currently not building because of

cannot find symbol
import com.giffing.wicket.spring.boot.example.model.Customer_;

and

cannot find symbol
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

from wicket-spring-boot-starter-example.

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 2, 2023

Linking this PR to #196

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 2, 2023

@martin-g I'd appreciate your help, whenever possible

@MarcGiffing
Copy link
Owner

The sources are currently not building because of

cannot find symbol
import com.giffing.wicket.spring.boot.example.model.Customer_;

Spring Boot 3 uses Hibernate 6. You may have to upgrade the hibernate-jpamodelgen Plugin/Dependency to Hibernate 6. It generates meta classes on build time which are used for typesafe database queries. I havn't tried it.

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 3, 2023

Thank you @MarcGiffing

Now sources are building but:

  1. had to configure wicket.verifier.dependencies.throw-exception-on-dependency-version-mismatch=false since wicketstuff is not available for Wicket 10
  2. possibly for this reason, the tests are failing with error
    java.lang.NoClassDefFoundError: org/apache/wicket/util/time/Duration
    
  3. wicket-bean-validation is still missing from SNAPSHOT repo, wrote to user@wicket ML

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 3, 2023

@MarcGiffing while wicketstuff is being upgraded to Wicket 10.x (hoping that this will restore the test success), can you please have a look at Lift definition? The Action executions above are all failing for some kind of syntax error:

Error: .github/workflows/lift.yml (Line: 12, Col: 23): Unexpected value ''
Error: .github/workflows/lift.yml (Line: 13, Col: 23): Unexpected value ''
Error: The template is not valid. .github/workflows/lift.yml (Line: 12, Col: 23): Unexpected value '',.github/workflows/lift.yml (Line: 13, Col: 23): Unexpected value ''

@martin-g
Copy link
Contributor

martin-g commented Jan 3, 2023

The Action executions above are all failing for some kind of syntax error:

The Github Actions secrets are not exported to PRs from contributors.
I think https://github.com/MarcGiffing/wicket-spring-boot/blob/master/.github/workflows/lift.yml#L3 should change pull_request to push.

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 6, 2023

Here's the PR for Wicketstuff 10.0.0-SNAPSHOT, which should be the last missing piece for this PR: wicketstuff/core#741

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 7, 2023

@MarcGiffing after upgrading WicketStuff to 10.0.0-SNAPSHOT and adjusting some test configuration, the build works locally for me and all tests succeed.

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Wicket Spring Boot Starter Parent 4.0.0-SNAPSHOT:
[INFO] 
[INFO] Wicket Spring Boot Starter Parent .................. SUCCESS [  0.085 s]
[INFO] Context ............................................ SUCCESS [  1.062 s]
[INFO] Wicket Spring Boot Starter ......................... SUCCESS [  1.230 s]
[INFO] Spring boot starter example ........................ SUCCESS [ 14.117 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.989 s
[INFO] Finished at: 2023-01-07T08:12:14+01:00
[INFO] ------------------------------------------------------------------------

Please review the PR content, thanks.

@MarcGiffing
Copy link
Owner

Thanks for the PR!

There is a problem with Spring Security. If i ran the example project I can't log in. In the SecureWebSession class the authenticate the user is resolved and contains the expected roles. But when the getRoles() method is called it contains only an anonymous user. Can you please start the example project and verify this problem?

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 7, 2023

@MarcGiffing it seems I was missing one of the steps to migrate to Spring Security 6: now all should work as expected.

@ilgrosso
Copy link
Contributor Author

ilgrosso commented Jan 8, 2023

@MarcGiffing I've fixed the reported formatting glitches.
Please let me know if there is anything further to adjust, thanks.

@MarcGiffing MarcGiffing merged commit 880bf26 into MarcGiffing:wicket-10 Jan 9, 2023
@ilgrosso ilgrosso deleted the SPRING_BOOT_3 branch January 9, 2023 19:37
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.

3 participants