Spaces:
Sleeping
Sleeping
Commit
·
8c86632
1
Parent(s):
e22740d
changes
Browse files
build.gradle.kts
CHANGED
|
@@ -15,14 +15,114 @@ repositories {
|
|
| 15 |
mavenCentral()
|
| 16 |
}
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
dependencies {
|
| 19 |
-
|
| 20 |
-
implementation("
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
implementation("org.springframework.boot:spring-boot-starter-websocket")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
}
|
| 25 |
|
|
|
|
| 26 |
tasks.withType<Test> {
|
| 27 |
useJUnitPlatform()
|
| 28 |
}
|
|
|
|
| 15 |
mavenCentral()
|
| 16 |
}
|
| 17 |
|
| 18 |
+
val grpcVersion: String by project.extra.properties
|
| 19 |
+
val jhipsterDependenciesVersion: String by project.extra.properties
|
| 20 |
+
val liquibaseHibernate5Version: String by project.extra.properties
|
| 21 |
+
val jaxbRuntimeVersion: String by project.extra.properties
|
| 22 |
+
val archunitJunit5Version: String by project.extra.properties
|
| 23 |
+
val springBootVersion: String by project.extra.properties
|
| 24 |
+
val mapstructVersion: String by project.extra.properties
|
| 25 |
+
//val liquibaseH2db = file(".liquibase_h2_db")
|
| 26 |
+
|
| 27 |
dependencies {
|
| 28 |
+
implementation("io.grpc:grpc-netty:$grpcVersion")
|
| 29 |
+
implementation("io.grpc:grpc-census:$grpcVersion")
|
| 30 |
+
implementation("io.grpc:grpc-protobuf:$grpcVersion")
|
| 31 |
+
implementation("io.grpc:grpc-stub:$grpcVersion")
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
testImplementation("io.grpc:grpc-testing:$grpcVersion")
|
| 35 |
+
|
| 36 |
+
implementation(platform("tech.jhipster:jhipster-dependencies:${jhipsterDependenciesVersion}"))
|
| 37 |
+
implementation(group = "tech.jhipster", name = "jhipster-framework")
|
| 38 |
+
implementation("javax.annotation:javax.annotation-api")
|
| 39 |
+
implementation("io.dropwizard.metrics:metrics-core")
|
| 40 |
+
implementation("io.micrometer:micrometer-registry-prometheus")
|
| 41 |
+
implementation("com.fasterxml.jackson.datatype:jackson-datatype-hppc")
|
| 42 |
+
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
|
| 43 |
+
implementation("com.fasterxml.jackson.module:jackson-module-jaxb-annotations")
|
| 44 |
+
implementation("com.fasterxml.jackson.datatype:jackson-datatype-hibernate5")
|
| 45 |
+
implementation("com.fasterxml.jackson.core:jackson-annotations")
|
| 46 |
+
implementation("com.fasterxml.jackson.core:jackson-databind")
|
| 47 |
+
implementation("org.hibernate:hibernate-core")
|
| 48 |
+
implementation("com.zaxxer:HikariCP")
|
| 49 |
+
implementation("org.apache.commons:commons-lang3")
|
| 50 |
+
implementation("javax.transaction:javax.transaction-api")
|
| 51 |
+
implementation("org.hibernate:hibernate-entitymanager")
|
| 52 |
+
implementation("org.hibernate.validator:hibernate-validator")
|
| 53 |
+
// implementation("org.liquibase:liquibase-core")
|
| 54 |
+
|
| 55 |
+
// liquibaseRuntime("org.liquibase:liquibase-core")
|
| 56 |
+
// liquibaseRuntime("org.liquibase.ext:liquibase-hibernate5:${liquibaseHibernate5Version}")
|
| 57 |
+
// liquibaseRuntime("org.postgresql:postgresql:42.5.2")
|
| 58 |
+
//// liquibaseRuntime("info.picocli:picocli:4.7.0")
|
| 59 |
+
// liquibaseRuntime(sourceSets.main.get().compileClasspath)
|
| 60 |
+
|
| 61 |
+
implementation("org.springframework.boot:spring-boot-loader-tools")
|
| 62 |
+
|
| 63 |
+
implementation("org.springframework.boot:spring-boot-starter-mail")
|
| 64 |
+
implementation("org.springframework.boot:spring-boot-starter-logging")
|
| 65 |
+
implementation("org.springframework.boot:spring-boot-starter-actuator")
|
| 66 |
+
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
|
| 67 |
implementation("org.springframework.boot:spring-boot-starter-websocket")
|
| 68 |
+
implementation("org.springframework.security:spring-security-messaging")
|
| 69 |
+
testImplementation("org.testcontainers:postgresql")
|
| 70 |
+
implementation("org.springframework.boot:spring-boot-starter-security")
|
| 71 |
+
implementation("org.springframework.boot:spring-boot-starter-web") {
|
| 72 |
+
exclude(module = "spring-boot-starter-tomcat")
|
| 73 |
+
}
|
| 74 |
+
implementation("org.springframework.boot:spring-boot-starter-undertow")
|
| 75 |
+
implementation("org.springframework.boot:spring-boot-starter-thymeleaf")
|
| 76 |
+
implementation("org.zalando:problem-spring-web")
|
| 77 |
+
implementation("org.springframework.cloud:spring-cloud-starter-bootstrap")
|
| 78 |
+
implementation("org.springframework.security:spring-security-config")
|
| 79 |
+
implementation("org.springframework.security:spring-security-data")
|
| 80 |
+
implementation("org.springframework.security:spring-security-web")
|
| 81 |
+
implementation("io.jsonwebtoken:jjwt-api")
|
| 82 |
+
implementation(group = "tech.tablesaw", name = "tablesaw-core", version = "0.43.1")
|
| 83 |
+
implementation(group = "tech.tablesaw", name = "tablesaw-json", version = "0.34.2")
|
| 84 |
+
implementation(group = "org.apache.commons", name = "commons-compress", version = "1.21")
|
| 85 |
+
runtimeOnly("io.jsonwebtoken:jjwt-impl")
|
| 86 |
+
runtimeOnly("io.jsonwebtoken:jjwt-jackson")
|
| 87 |
+
|
| 88 |
+
implementation("org.springdoc:springdoc-openapi-webmvc-core")
|
| 89 |
+
implementation(group = "org.springdoc", name = "springdoc-openapi-ui", version = "1.6.11")
|
| 90 |
+
implementation("org.postgresql:postgresql")
|
| 91 |
+
|
| 92 |
+
implementation("com.h2database:h2")
|
| 93 |
+
testImplementation("com.h2database:h2")
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
// annotationProcessor("org.hibernate:hibernate-jpamodelgen:${hibernateVersion}.Final")
|
| 97 |
+
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:${springBootVersion}")
|
| 98 |
testImplementation("org.springframework.boot:spring-boot-starter-test")
|
| 99 |
+
testImplementation("org.springframework.security:spring-security-test")
|
| 100 |
+
testImplementation("org.springframework.boot:spring-boot-test")
|
| 101 |
+
testImplementation("com.tngtech.archunit:archunit-junit5-api:${archunitJunit5Version}")
|
| 102 |
+
testRuntimeOnly("com.tngtech.archunit:archunit-junit5-engine:${archunitJunit5Version}")
|
| 103 |
+
developmentOnly("org.springframework.boot:spring-boot-devtools:${springBootVersion}")
|
| 104 |
+
// protobuf(files("../common/proto"))
|
| 105 |
+
|
| 106 |
+
compileOnly("org.projectlombok:lombok")
|
| 107 |
+
annotationProcessor("org.projectlombok:lombok")
|
| 108 |
+
// MapStruct
|
| 109 |
+
compileOnly("org.mapstruct:mapstruct:${mapstructVersion}")
|
| 110 |
+
annotationProcessor("org.mapstruct:mapstruct-processor:${mapstructVersion}")
|
| 111 |
+
|
| 112 |
+
implementation(files("$projectDir/src/main/resources/third-party/j2ts-api.jar"))
|
| 113 |
+
implementation(group = "com.fasterxml.jackson.dataformat", name = "jackson-dataformat-yaml", version = "2.14.2")
|
| 114 |
+
implementation(group = "com.github.luben", name = "zstd-jni", version = "1.5.2-3")
|
| 115 |
+
implementation("org.apache.commons:commons-compress:1.21")
|
| 116 |
+
implementation("org.apache.commons:commons-csv:1.10.0")
|
| 117 |
+
implementation("commons-codec:commons-codec:1.15")
|
| 118 |
+
implementation("com.google.protobuf:protobuf-java-util:3.21.9")
|
| 119 |
+
// implementation("com.github.blagerweij:liquibase-sessionlock:1.6.2")
|
| 120 |
+
|
| 121 |
+
implementation("commons-fileupload:commons-fileupload:1.4")
|
| 122 |
+
implementation("commons-io:commons-io:2.11.0")
|
| 123 |
}
|
| 124 |
|
| 125 |
+
|
| 126 |
tasks.withType<Test> {
|
| 127 |
useJUnitPlatform()
|
| 128 |
}
|
gradle.properties
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
giskardVersion=2.0.0b10
|
| 2 |
+
|
| 3 |
+
rootProject.name=giskard
|
| 4 |
+
profile=dev
|
| 5 |
+
|
| 6 |
+
# Dependency versions
|
| 7 |
+
jhipsterDependenciesVersion=7.8.1
|
| 8 |
+
# The spring-boot version should match the one managed by
|
| 9 |
+
# https://mvnrepository.com/artifact/tech.jhipster/jhipster-dependencies/
|
| 10 |
+
springBootVersion=2.6.6
|
| 11 |
+
# The hibernate version should match the one managed by
|
| 12 |
+
# https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies/ -->
|
| 13 |
+
hibernateVersion=5.6.7
|
| 14 |
+
mapstructVersion=1.5.3.Final
|
| 15 |
+
archunitJunit5Version=0.22.0
|
| 16 |
+
liquibaseHibernate5Version=4.6.1
|
| 17 |
+
liquibaseTaskPrefix=liquibase
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
jaxbRuntimeVersion=2.3.3
|
| 22 |
+
|
| 23 |
+
# gradle plugin version
|
| 24 |
+
jibPluginVersion=3.1.4
|
| 25 |
+
gitPropertiesPluginVersion=2.3.2
|
| 26 |
+
liquibasePluginVersion=2.1.1
|
| 27 |
+
sonarqubePluginVersion=4.2.0.3129
|
| 28 |
+
noHttpCheckstyleVersion=0.0.10
|
| 29 |
+
checkstyleVersion=9.2
|
| 30 |
+
modernizerPluginVersion=1.6.1
|
| 31 |
+
grpcVersion = 1.52.1
|
| 32 |
+
protobufVersion = 3.19.2
|
| 33 |
+
protocVersion = 3.19.2
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
## When configured, Gradle will run in incubating parallel mode.
|
| 37 |
+
## This option should only be used with decoupled projects. More details, visit
|
| 38 |
+
## http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
| 39 |
+
## uncomment the below line to enable parallel mode
|
| 40 |
+
|
| 41 |
+
#org.gradle.parallel=true
|
| 42 |
+
|
| 43 |
+
## Install and use a local version of node and npm.
|
| 44 |
+
nodeInstall
|
| 45 |
+
|
| 46 |
+
org.gradle.jvmargs=-Xmx2000m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
| 47 |
+
org.gradle.caching=true
|
| 48 |
+
|
src/main/java/ai/giskard/learnspringwebsockets/LearnSpringWebsocketsApplication.java
CHANGED
|
@@ -14,7 +14,10 @@ import java.io.IOException;
|
|
| 14 |
import java.util.Collections;
|
| 15 |
import java.util.Enumeration;
|
| 16 |
|
| 17 |
-
@SpringBootApplication
|
|
|
|
|
|
|
|
|
|
| 18 |
public class LearnSpringWebsocketsApplication {
|
| 19 |
|
| 20 |
public static void main(String[] args) {
|
|
|
|
| 14 |
import java.util.Collections;
|
| 15 |
import java.util.Enumeration;
|
| 16 |
|
| 17 |
+
@SpringBootApplication(exclude = {
|
| 18 |
+
org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class,
|
| 19 |
+
org.springframework.boot.actuate.autoconfigure.security.servlet.ManagementWebSecurityAutoConfiguration.class
|
| 20 |
+
})
|
| 21 |
public class LearnSpringWebsocketsApplication {
|
| 22 |
|
| 23 |
public static void main(String[] args) {
|
src/main/java/ai/giskard/learnspringwebsockets/WebSocketBrokerConfig.java
CHANGED
|
@@ -6,8 +6,8 @@ import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBr
|
|
| 6 |
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
| 7 |
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
| 8 |
|
| 9 |
-
@Configuration
|
| 10 |
-
@EnableWebSocketMessageBroker
|
| 11 |
public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
| 12 |
|
| 13 |
@Override
|
|
|
|
| 6 |
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
| 7 |
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
|
| 8 |
|
| 9 |
+
// @Configuration
|
| 10 |
+
// @EnableWebSocketMessageBroker
|
| 11 |
public class WebSocketBrokerConfig implements WebSocketMessageBrokerConfigurer {
|
| 12 |
|
| 13 |
@Override
|
src/main/java/ai/giskard/learnspringwebsockets/WebSocketConfig.java
CHANGED
|
@@ -16,13 +16,13 @@ import java.security.Principal;
|
|
| 16 |
import java.util.List;
|
| 17 |
import java.util.Map;
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
public class WebSocketConfig implements WebSocketConfigurer {
|
| 22 |
|
| 23 |
@Override
|
| 24 |
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
| 25 |
-
registry.addHandler(myHandler(), "/
|
| 26 |
@Override
|
| 27 |
public RequestUpgradeStrategy getRequestUpgradeStrategy() {
|
| 28 |
System.out.println("public RequestUpgradeStrategy getRequestUpgradeStrategy() {");
|
|
|
|
| 16 |
import java.util.List;
|
| 17 |
import java.util.Map;
|
| 18 |
|
| 19 |
+
@Configuration
|
| 20 |
+
@EnableWebSocket
|
| 21 |
public class WebSocketConfig implements WebSocketConfigurer {
|
| 22 |
|
| 23 |
@Override
|
| 24 |
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
| 25 |
+
registry.addHandler(myHandler(), "/websocket").setHandshakeHandler(new AbstractHandshakeHandler() {
|
| 26 |
@Override
|
| 27 |
public RequestUpgradeStrategy getRequestUpgradeStrategy() {
|
| 28 |
System.out.println("public RequestUpgradeStrategy getRequestUpgradeStrategy() {");
|