MarcGiffing / wicket-spring-boot

Spring Boot starter for Apache Wicket
151 stars 61 forks source link

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

Closed ilgrosso closed 1 year ago

ilgrosso commented 1 year ago
ilgrosso commented 1 year ago

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 commented 1 year ago

Linking this PR to #196

ilgrosso commented 1 year ago

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

MarcGiffing commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

Here's the PR for Wicketstuff 10.0.0-SNAPSHOT, which should be the last missing piece for this PR: https://github.com/wicketstuff/core/pull/741

ilgrosso commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

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

ilgrosso commented 1 year ago

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