File tree 18 files changed +47
-52
lines changed
editors/src/main/java/graphql/kickstart/sample
file-upload/src/main/java/upload
main/java/graphql/kickstart/spring/boot/graphql/annotations/example/model/type
test/java/graphql/kickstart/spring/boot/graphql/annotations/example
request-scoped-dataloader/src/main/java/graphql/servlet/examples/dataloader/requestscope
spring-common/src/main/java/graphql/kickstart/autoconfigure/web/servlet/sample/schema
subscription-with-authentication/src/main/java/subscription
18 files changed +47
-52
lines changed Original file line number Diff line number Diff line change @@ -23,11 +23,11 @@ jobs:
23
23
uses : actions/setup-java@v3
24
24
with :
25
25
distribution : ' temurin'
26
- java-version : 11
26
+ java-version : 17
27
27
- name : Cache Gradle
28
28
uses : actions/cache@v3
29
29
env :
30
- java-version : 11
30
+ java-version : 17
31
31
with :
32
32
path : |
33
33
~/.gradle/caches
@@ -48,11 +48,11 @@ jobs:
48
48
- uses : actions/checkout@v3
49
49
with :
50
50
fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
51
- - name : Set up JDK 11
51
+ - name : Set up JDK 17
52
52
uses : actions/setup-java@v3
53
53
with :
54
54
distribution : ' temurin'
55
- java-version : 11
55
+ java-version : 17
56
56
- name : Cache SonarCloud packages
57
57
uses : actions/cache@v3
58
58
with :
Original file line number Diff line number Diff line change 16
16
fail-fast : false
17
17
matrix :
18
18
os : [ ubuntu-latest, macos-latest, windows-latest ]
19
- java : [ 11, 17 ]
19
+ java : [ 17, 19 ]
20
20
needs : validation
21
21
runs-on : ${{ matrix.os }}
22
22
steps :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ plugins {
4
4
id " jacoco"
5
5
}
6
6
7
- sonarqube {
7
+ sonar {
8
8
properties {
9
9
property " sonar.projectKey" , " graphql-java-kickstart_graphql-java-kickstart-samples"
10
10
property " sonar.organization" , " graphql-java-kickstart"
@@ -27,8 +27,8 @@ subprojects {
27
27
}
28
28
29
29
compileJava {
30
- sourceCompatibility = JavaVersion . VERSION_11
31
- targetCompatibility = JavaVersion . VERSION_11
30
+ sourceCompatibility = JavaVersion . VERSION_17
31
+ targetCompatibility = JavaVersion . VERSION_17
32
32
}
33
33
34
34
test {
@@ -37,7 +37,7 @@ subprojects {
37
37
38
38
jacocoTestReport {
39
39
reports {
40
- xml. enabled = true
40
+ xml. required = true
41
41
}
42
42
}
43
43
}
Original file line number Diff line number Diff line change 1
1
package graphql .kickstart .sample ;
2
2
3
+ import org .springframework .context .annotation .Bean ;
3
4
import org .springframework .context .annotation .Configuration ;
4
5
import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
5
6
import org .springframework .security .config .annotation .web .configuration .EnableWebSecurity ;
6
- import org .springframework .security .config . annotation . web .configuration . WebSecurityConfigurerAdapter ;
7
+ import org .springframework .security .web .SecurityFilterChain ;
7
8
8
9
@ Configuration
9
10
@ EnableWebSecurity
10
- class SecurityConfig extends WebSecurityConfigurerAdapter {
11
+ class SecurityConfig {
11
12
12
- @ Override
13
- protected void configure (final HttpSecurity http ) throws Exception {
14
- http .authorizeRequests ().anyRequest ().permitAll ();
13
+ @ Bean
14
+ public SecurityFilterChain filterChain (HttpSecurity http ) throws Exception {
15
+ http .authorizeHttpRequests ().anyRequest ().permitAll ();
16
+ return http .build ();
15
17
}
16
18
}
Original file line number Diff line number Diff line change 2
2
3
3
import graphql .kickstart .tools .GraphQLMutationResolver ;
4
4
import java .io .IOException ;
5
- import javax .servlet .http .Part ;
5
+ import jakarta .servlet .http .Part ;
6
6
import lombok .extern .slf4j .Slf4j ;
7
7
import org .springframework .stereotype .Service ;
8
8
Original file line number Diff line number Diff line change 1
- LIB_GRAPHQL_SERVLET_VER =14 .0.0
1
+ LIB_GRAPHQL_SERVLET_VER =15 .0.0
2
2
LIB_GRAPHQL_SPRING_BOOT_VER =15.0.0
3
3
LIB_GRAPHQL_TOOLS_VER =13.0.2
4
4
LIB_GRAPHQL_EXTENDED_VALIDATION_VER =19.1
5
- LIB_SPRING_BOOT_VER =2.7.6
6
- sourceCompatibility =11
7
- targetCompatibility =11
5
+ LIB_SPRING_BOOT_VER =3.0.0
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ dependencies {
5
5
6
6
implementation(" org.springframework.boot:spring-boot-starter-web" )
7
7
implementation(" org.springframework.boot:spring-boot-starter-data-jpa" )
8
- implementation " io.reactivex.rxjava2:rxjava"
8
+ implementation " io.reactivex.rxjava2:rxjava:2.2.21 "
9
9
implementation " org.projectlombok:lombok"
10
10
annotationProcessor " org.projectlombok:lombok"
11
11
runtimeOnly(" com.h2database:h2" )
Original file line number Diff line number Diff line change 5
5
import graphql .annotations .annotationTypes .GraphQLNonNull ;
6
6
import graphql .kickstart .spring .boot .graphql .annotations .example .model .directives .UpperCaseDirective ;
7
7
import java .time .LocalDate ;
8
- import javax .persistence .Column ;
9
- import javax .persistence .Entity ;
10
- import javax .persistence .Id ;
8
+ import jakarta .persistence .Column ;
9
+ import jakarta .persistence .Entity ;
10
+ import jakarta .persistence .Id ;
11
11
import lombok .AllArgsConstructor ;
12
12
import lombok .Builder ;
13
13
import lombok .Data ;
Original file line number Diff line number Diff line change 22
22
23
23
@ SpringBootTest (webEnvironment = SpringBootTest .WebEnvironment .RANDOM_PORT )
24
24
@ Slf4j
25
- public class CreatePersonTest {
25
+ class CreatePersonTest {
26
26
27
27
private static final String FIRST_NAME = "John" ;
28
28
private static final String LAST_NAME = "Doe" ;
Original file line number Diff line number Diff line change 6
6
import graphql .kickstart .servlet .context .GraphQLServletContextBuilder ;
7
7
import java .util .HashMap ;
8
8
import java .util .Map ;
9
- import javax .servlet .http .HttpServletRequest ;
10
- import javax .servlet .http .HttpServletResponse ;
11
- import javax .websocket .Session ;
12
- import javax .websocket .server .HandshakeRequest ;
9
+ import jakarta .servlet .http .HttpServletRequest ;
10
+ import jakarta .servlet .http .HttpServletResponse ;
11
+ import jakarta .websocket .Session ;
12
+ import jakarta .websocket .server .HandshakeRequest ;
13
13
import org .dataloader .DataLoader ;
14
14
import org .dataloader .DataLoaderFactory ;
15
15
import org .dataloader .DataLoaderRegistry ;
Original file line number Diff line number Diff line change 1
- def jettyVersion = ' 9.4.49.v20220914 '
1
+ def jettyVersion = ' 11.0.12 '
2
2
3
3
dependencies {
4
4
implementation " com.graphql-java-kickstart:graphql-java-servlet:$LIB_GRAPHQL_SERVLET_VER "
@@ -7,8 +7,5 @@ dependencies {
7
7
implementation ' org.slf4j:slf4j-simple:2.0.5'
8
8
implementation " org.eclipse.jetty:jetty-webapp:${ jettyVersion} "
9
9
implementation " org.eclipse.jetty:jetty-annotations:${ jettyVersion} "
10
- implementation " org.eclipse.jetty.websocket:websocket-api:${ jettyVersion} "
11
- implementation " org.eclipse.jetty.websocket:websocket-server:${ jettyVersion} "
12
- implementation " org.eclipse.jetty.websocket:javax-websocket-server-impl:${ jettyVersion} "
13
- implementation " org.eclipse.jetty.websocket:websocket-common:${ jettyVersion} "
10
+ implementation " org.eclipse.jetty.websocket:websocket-jetty-server:${ jettyVersion} "
14
11
}
Original file line number Diff line number Diff line change 1
1
package hello ;
2
2
3
- import javax .websocket .HandshakeResponse ;
4
- import javax .websocket .server .HandshakeRequest ;
5
- import javax .websocket .server .ServerEndpointConfig ;
3
+ import jakarta .websocket .HandshakeResponse ;
4
+ import jakarta .websocket .server .HandshakeRequest ;
5
+ import jakarta .websocket .server .ServerEndpointConfig ;
6
6
7
7
public class GraphQLWSEndpointConfigurer extends ServerEndpointConfig .Configurator {
8
8
Original file line number Diff line number Diff line change 1
1
package hello ;
2
2
3
- import javax .websocket .server .ServerEndpointConfig ;
4
3
import org .eclipse .jetty .server .Server ;
5
4
import org .eclipse .jetty .server .ServerConnector ;
6
5
import org .eclipse .jetty .servlet .ServletContextHandler ;
7
- import org .eclipse .jetty .websocket .jsr356 . server .deploy . WebSocketServerContainerInitializer ;
6
+ import org .eclipse .jetty .websocket .server .config . JettyWebSocketServletContainerInitializer ;
8
7
9
8
class HttpMain {
10
9
@@ -21,13 +20,10 @@ public static void main(String[] args) throws Exception {
21
20
context .addServlet (HelloServlet .class , "/graphql" );
22
21
server .setHandler (context );
23
22
24
- WebSocketServerContainerInitializer .configure (
23
+ JettyWebSocketServletContainerInitializer .configure (
25
24
context ,
26
25
(servletContext , serverContainer ) ->
27
- serverContainer .addEndpoint (
28
- ServerEndpointConfig .Builder .create (SubscriptionEndpoint .class , "/subscriptions" )
29
- .configurator (new GraphQLWSEndpointConfigurer ())
30
- .build ()));
26
+ serverContainer .addMapping ("/subscriptions" , GraphQLWSEndpointConfigurer .class ));
31
27
32
28
server .setHandler (context );
33
29
Original file line number Diff line number Diff line change 1
1
// Common settings only needed for Spring Boot based samples
2
2
3
3
apply plugin : " io.spring.dependency-management"
4
- apply plugin : " org.springframework.boot"
4
+ // apply plugin: "org.springframework.boot"
5
5
6
6
dependencyManagement {
7
7
imports {
Original file line number Diff line number Diff line change 34
34
import java .util .Collection ;
35
35
import java .util .List ;
36
36
import java .util .stream .Collectors ;
37
- import javax .servlet .http .Part ;
37
+ import jakarta .servlet .http .Part ;
38
38
39
39
@ GraphQLSchema
40
40
public class TodoSchema {
Original file line number Diff line number Diff line change 4
4
import graphql .kickstart .tools .GraphQLSubscriptionResolver ;
5
5
import graphql .schema .DataFetchingEnvironment ;
6
6
import java .util .Optional ;
7
- import javax .websocket .Session ;
7
+ import jakarta .websocket .Session ;
8
8
import org .reactivestreams .Publisher ;
9
9
import org .slf4j .Logger ;
10
10
import org .slf4j .LoggerFactory ;
Original file line number Diff line number Diff line change 1
1
package subscription ;
2
2
3
+ import org .springframework .context .annotation .Bean ;
3
4
import org .springframework .context .annotation .Configuration ;
4
5
import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
5
- import org .springframework .security .config . annotation . web .configuration . WebSecurityConfigurerAdapter ;
6
+ import org .springframework .security .web .SecurityFilterChain ;
6
7
7
8
@ Configuration
8
- class SecurityConfiguration extends WebSecurityConfigurerAdapter {
9
+ class SecurityConfiguration {
9
10
10
- @ Override
11
- protected void configure (HttpSecurity http ) throws Exception {
12
- http .authorizeRequests ()
11
+ @ Bean
12
+ public SecurityFilterChain filterChain (HttpSecurity http ) throws Exception {
13
+ http .authorizeHttpRequests ()
13
14
.anyRequest ()
14
15
.permitAll ()
15
16
.and ()
@@ -19,5 +20,6 @@ protected void configure(HttpSecurity http) throws Exception {
19
20
.and ()
20
21
.logout ()
21
22
.permitAll ();
23
+ return http .build ();
22
24
}
23
25
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dependencyManagement {
11
11
dependencies {
12
12
implementation(" com.graphql-java-kickstart:graphql-spring-boot-starter" )
13
13
14
- implementation " io.reactivex.rxjava2:rxjava"
14
+ implementation " io.reactivex.rxjava2:rxjava:2.2.21 "
15
15
implementation " io.projectreactor:reactor-core"
16
16
implementation(" org.springframework.boot:spring-boot-starter-web" )
17
17
implementation(" org.springframework.boot:spring-boot-starter-websocket" )
You can’t perform that action at this time.
0 commit comments