-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from valb3r/bugfix/LTH-23-Spring-boot-3.1
Fixes for Spring 3.1+
- Loading branch information
Showing
20 changed files
with
278 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation project(":jetty") | ||
testImplementation project(":tests-common") | ||
|
||
testImplementation ("org.springframework.boot:spring-boot-starter-web:3.0.0") { | ||
exclude module: 'spring-boot-starter-tomcat' | ||
} | ||
testImplementation "org.springframework.boot:spring-boot-starter-jetty:3.0.0" | ||
testImplementation "org.springframework.boot:spring-boot-starter-test:3.0.0" | ||
// See https://github.com/spring-projects/spring-boot/issues/33044 for details | ||
testImplementation('jakarta.servlet:jakarta.servlet-api') { | ||
version { | ||
strictly '5.0.0' | ||
because "Jetty 11 does not support Servlet 6 yet" | ||
} | ||
} | ||
|
||
testImplementation "org.awaitility:awaitility:$awaitability" | ||
testImplementation "org.junit.jupiter:junit-jupiter-engine:$jupiter" | ||
testImplementation "org.testcontainers:junit-jupiter:$testContainers" | ||
testImplementation "org.assertj:assertj-core:$assertj" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
24 changes: 24 additions & 0 deletions
24
...ng-3.0/src/test/java/com/github/valb3r/letsencrypthelper/jetty/DisableJettySniConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.github.valb3r.letsencrypthelper.jetty; | ||
|
||
import org.eclipse.jetty.server.HttpConnectionFactory; | ||
import org.eclipse.jetty.server.SecureRequestCustomizer; | ||
import org.eclipse.jetty.server.Server; | ||
import org.springframework.boot.web.embedded.jetty.JettyServerCustomizer; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
import java.util.Arrays; | ||
|
||
@Configuration | ||
public class DisableJettySniConfig implements JettyServerCustomizer { | ||
|
||
@Override | ||
public void customize(Server server) { | ||
Arrays.stream(server.getConnectors()) | ||
.forEach( | ||
connector -> connector.getConnectionFactory(HttpConnectionFactory.class) | ||
.getHttpConfiguration() | ||
.getCustomizer(SecureRequestCustomizer.class) | ||
.setSniHostCheck(false) | ||
); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
....0/src/test/java/com/github/valb3r/letsencrypthelper/jetty/JettyExpiredKeyPebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.valb3r.letsencrypthelper.jetty; | ||
|
||
import com.github.valb3r.letsencrypthelper.ExpiredKeyPebbleTest; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Import(DisableJettySniConfig.class) | ||
class JettyExpiredKeyPebbleTest extends ExpiredKeyPebbleTest { | ||
} |
8 changes: 8 additions & 0 deletions
8
....0/src/test/java/com/github/valb3r/letsencrypthelper/jetty/JettyNoKeystorePebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.valb3r.letsencrypthelper.jetty; | ||
|
||
import com.github.valb3r.letsencrypthelper.NoKeystorePebbleTest; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Import(DisableJettySniConfig.class) | ||
class JettyNoKeystorePebbleTest extends NoKeystorePebbleTest { | ||
} |
8 changes: 8 additions & 0 deletions
8
...est/java/com/github/valb3r/letsencrypthelper/jetty/JettyNotExpiredKeystorePebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.github.valb3r.letsencrypthelper.jetty; | ||
|
||
import com.github.valb3r.letsencrypthelper.NotExpiredKeystorePebbleTest; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Import(DisableJettySniConfig.class) | ||
class JettyNotExpiredKeystorePebbleTest extends NotExpiredKeystorePebbleTest { | ||
} |
15 changes: 15 additions & 0 deletions
15
...spring-3.0/src/test/java/com/github/valb3r/letsencrypthelper/jetty/dummyapp/DummyApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.valb3r.letsencrypthelper.jetty.dummyapp; | ||
|
||
import com.github.valb3r.letsencrypthelper.jetty.JettyWellKnownLetsEncryptChallengeEndpointConfig; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@SpringBootApplication | ||
@Import({JettyWellKnownLetsEncryptChallengeEndpointConfig.class}) | ||
public class DummyApp { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(DummyApp.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
testImplementation project(":tomcat") | ||
testImplementation project(":tests-common") | ||
testImplementation "org.springframework.boot:spring-boot-starter-web:3.0.0" | ||
testImplementation "org.springframework.boot:spring-boot-starter-tomcat:3.0.0" | ||
testImplementation "org.springframework.boot:spring-boot-starter-test:3.0.0" | ||
|
||
testImplementation "org.awaitility:awaitility:$awaitability" | ||
testImplementation "org.junit.jupiter:junit-jupiter-engine:$jupiter" | ||
testImplementation "org.testcontainers:junit-jupiter:$testContainers" | ||
testImplementation "org.assertj:assertj-core:$assertj" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/test/java/com/github/valb3r/letsencrypthelper/tomcat/TomcatExpiredKeyPebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat; | ||
|
||
import com.github.valb3r.letsencrypthelper.ExpiredKeyPebbleTest; | ||
|
||
class TomcatExpiredKeyPebbleTest extends ExpiredKeyPebbleTest { | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/test/java/com/github/valb3r/letsencrypthelper/tomcat/TomcatNoKeystorePebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat; | ||
|
||
import com.github.valb3r.letsencrypthelper.NoKeystorePebbleTest; | ||
|
||
class TomcatNoKeystorePebbleTest extends NoKeystorePebbleTest { | ||
} |
6 changes: 6 additions & 0 deletions
6
...t/java/com/github/valb3r/letsencrypthelper/tomcat/TomcatNotExpiredKeystorePebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat; | ||
|
||
import com.github.valb3r.letsencrypthelper.NotExpiredKeystorePebbleTest; | ||
|
||
class TomcatNotExpiredKeystorePebbleTest extends NotExpiredKeystorePebbleTest { | ||
} |
15 changes: 15 additions & 0 deletions
15
...pring-3.0/src/test/java/com/github/valb3r/letsencrypthelper/tomcat/dummyapp/DummyApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat.dummyapp; | ||
|
||
import com.github.valb3r.letsencrypthelper.tomcat.TomcatWellKnownLetsEncryptChallengeEndpointConfig; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@SpringBootApplication | ||
@Import({TomcatWellKnownLetsEncryptChallengeEndpointConfig.class}) | ||
public class DummyApp { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(DummyApp.class); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { url "https://repo.spring.io/milestone" } | ||
} | ||
|
||
dependencies { | ||
testImplementation project(":tomcat") | ||
testImplementation project(":tests-common") | ||
testImplementation "org.springframework.boot:spring-boot-starter-web:3.2.0-M1" | ||
testImplementation "org.springframework.boot:spring-boot-starter-tomcat:3.2.0-M1" | ||
testImplementation "org.springframework.boot:spring-boot-starter-test:3.2.0-M1" | ||
|
||
testImplementation "org.awaitility:awaitility:$awaitability" | ||
testImplementation "org.junit.jupiter:junit-jupiter-engine:$jupiter" | ||
testImplementation "org.testcontainers:junit-jupiter:1.18.3" | ||
testImplementation "org.assertj:assertj-core:$assertj" | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/test/java/com/github/valb3r/letsencrypthelper/tomcat/TomcatExpiredKeyPebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat; | ||
|
||
import com.github.valb3r.letsencrypthelper.ExpiredKeyPebbleTest; | ||
|
||
class TomcatExpiredKeyPebbleTest extends ExpiredKeyPebbleTest { | ||
} |
6 changes: 6 additions & 0 deletions
6
.../src/test/java/com/github/valb3r/letsencrypthelper/tomcat/TomcatNoKeystorePebbleTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.github.valb3r.letsencrypthelper.tomcat; | ||
|
||
import com.github.valb3r.letsencrypthelper.NoKeystorePebbleTest; | ||
|
||
class TomcatNoKeystorePebbleTest extends NoKeystorePebbleTest { | ||
} |
Oops, something went wrong.