Updated spring and dgs

This commit is contained in:
Sambo Chea 2022-05-27 12:30:12 +07:00
parent ae023ee293
commit feedc82a80
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
8 changed files with 14 additions and 11 deletions

View File

@ -1,7 +1,7 @@
# GraphQL & Spring Boot (Demo Project) # GraphQL & Spring Boot (Demo Project)
- Spring Boot (2.6) - Spring Boot (2.7)
- DGS Framework (4.5.0) - DGS Framework (4.10.4)
- Kotlin (1.5.21) - Kotlin (1.6.21)
# Contributors # Contributors
- Sambo Chea <sombochea@cubetiqs.com> - Sambo Chea <sombochea@cubetiqs.com>

View File

@ -11,13 +11,13 @@ plugins {
allprojects { allprojects {
repositories { repositories {
maven { url = uri("https://m.ctdn.net") } mavenCentral()
} }
group = "com.cubetiqs" group = "com.cubetiqs"
version = "0.0.1-SNAPSHOT" version = "0.0.1-SNAPSHOT"
val javaVersion = "11" val javaVersion = "17"
tasks.withType<JavaCompile> { tasks.withType<JavaCompile> {
sourceCompatibility = javaVersion sourceCompatibility = javaVersion

View File

@ -7,13 +7,12 @@ plugins {
id("com.netflix.dgs.codegen") id("com.netflix.dgs.codegen")
} }
extra["dgsVersion"] = "4.5.0"
dependencies { dependencies {
api(project(":cubetiq-security-jwt")) api(project(":cubetiq-security-jwt"))
implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter:${property("dgsVersion")}") implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:4.10.4"))
runtimeOnly("com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure:${property("dgsVersion")}") implementation("com.netflix.graphql.dgs:graphql-dgs-spring-boot-starter")
runtimeOnly("com.netflix.graphql.dgs:graphql-dgs-subscriptions-websockets-autoconfigure")
implementation("org.springframework.boot:spring-boot-starter-security") implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-actuator") implementation("org.springframework.boot:spring-boot-starter-actuator")

View File

@ -9,6 +9,7 @@ import org.springframework.security.config.annotation.method.configuration.Enabl
import org.springframework.security.config.annotation.web.builders.HttpSecurity import org.springframework.security.config.annotation.web.builders.HttpSecurity
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
import org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer
import org.springframework.security.config.http.SessionCreationPolicy import org.springframework.security.config.http.SessionCreationPolicy
@Configuration @Configuration

View File

@ -0,0 +1 @@
application-local.yml

View File

@ -3,6 +3,8 @@ server:
# Spring Boot # Spring Boot
spring: spring:
profiles:
active: ${APP_PROFILE:}
datasource: datasource:
url: jdbc:postgresql://${DB_HOST:localhost}:5432/${DB_NAME:graphql-demo} url: jdbc:postgresql://${DB_HOST:localhost}:5432/${DB_NAME:graphql-demo}
username: ${DB_USER:your-username} username: ${DB_USER:your-username}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -1,4 +1,4 @@
rootProject.name = "graphql-demo" rootProject.name = "spring-graphql-demo"
include("dgs-graphql") include("dgs-graphql")
include("cubetiq-security-jwt") include("cubetiq-security-jwt")