Compare commits

..

19 Commits

Author SHA1 Message Date
abb35e94c0
Completed upgraded the Spring Boot 3.x and Configuration
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-12-05 20:45:16 +07:00
Sambo Chea
48e8f38ba8
Merge pull request #42 from CUBETIQ/dependabot/gradle/org.springframework.boot-3.0.0
Bump org.springframework.boot from 2.7.5 to 3.0.0
2022-12-05 20:18:58 +07:00
Sambo Chea
e8e4808586
Merge pull request #45 from CUBETIQ/dependabot/gradle/plugin.spring-1.7.22
Bump plugin.spring from 1.7.21 to 1.7.22
2022-12-05 20:18:25 +07:00
dependabot[bot]
9b77876fa5
Bump plugin.spring from 1.7.21 to 1.7.22
Bumps [plugin.spring](https://github.com/JetBrains/kotlin) from 1.7.21 to 1.7.22.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/compare/v1.7.21...v1.7.22)

---
updated-dependencies:
- dependency-name: plugin.spring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 06:10:05 +00:00
dependabot[bot]
fc0290c76f
Bump org.springframework.boot from 2.7.5 to 3.0.0
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 2.7.5 to 3.0.0.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v2.7.5...v3.0.0)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-25 06:07:04 +00:00
Sambo Chea
c81b8892d8
Merge pull request #41 from CUBETIQ/dependabot/gradle/org.springdoc-springdoc-openapi-ui-1.6.13
Bump springdoc-openapi-ui from 1.6.12 to 1.6.13
2022-11-21 18:45:51 +07:00
dependabot[bot]
77340b6c4f
Bump springdoc-openapi-ui from 1.6.12 to 1.6.13
Bumps [springdoc-openapi-ui](https://github.com/springdoc/springdoc-openapi) from 1.6.12 to 1.6.13.
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/springdoc/springdoc-openapi/compare/v1.6.12...v1.6.13)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-21 06:35:01 +00:00
Sambo Chea
08cef32268
Merge pull request #38 from CUBETIQ/dependabot/gradle/plugin.spring-1.7.21
Bump plugin.spring from 1.7.20 to 1.7.21
2022-11-09 20:07:15 +07:00
dependabot[bot]
16746066b7
Bump plugin.spring from 1.7.20 to 1.7.21
Bumps [plugin.spring](https://github.com/JetBrains/kotlin) from 1.7.20 to 1.7.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: plugin.spring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 13:02:47 +00:00
Sambo Chea
cc19498098
Merge pull request #39 from CUBETIQ/dependabot/gradle/plugin.jpa-1.7.21
Bump plugin.jpa from 1.7.20 to 1.7.21
2022-11-09 20:01:40 +07:00
Sambo Chea
a75413b232
Merge pull request #40 from CUBETIQ/dependabot/gradle/jvm-1.7.21
Bump jvm from 1.7.20 to 1.7.21
2022-11-09 20:01:24 +07:00
dependabot[bot]
e601cb684b
Bump jvm from 1.7.20 to 1.7.21
Bumps [jvm](https://github.com/JetBrains/kotlin) from 1.7.20 to 1.7.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: jvm
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 06:09:09 +00:00
dependabot[bot]
9f81701eda
Bump plugin.jpa from 1.7.20 to 1.7.21
Bumps [plugin.jpa](https://github.com/JetBrains/kotlin) from 1.7.20 to 1.7.21.
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

---
updated-dependencies:
- dependency-name: plugin.jpa
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 06:07:35 +00:00
Sambo Chea
1485176f6b
Merge pull request #37 from CUBETIQ/dependabot/gradle/org.springframework.boot-2.7.5
Bump org.springframework.boot from 2.7.4 to 2.7.5
2022-10-21 20:19:58 +07:00
dependabot[bot]
f203b319eb
Bump org.springframework.boot from 2.7.4 to 2.7.5
Bumps [org.springframework.boot](https://github.com/spring-projects/spring-boot) from 2.7.4 to 2.7.5.
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](https://github.com/spring-projects/spring-boot/compare/v2.7.4...v2.7.5)

---
updated-dependencies:
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-21 06:45:08 +00:00
Sambo Chea
b4a183aaa2
Merge pull request #36 from CUBETIQ/dependabot/gradle/io.spring.dependency-management-1.1.0
Bump io.spring.dependency-management from 1.0.14.RELEASE to 1.1.0
2022-10-19 20:02:37 +07:00
dependabot[bot]
60721f593c
Bump io.spring.dependency-management from 1.0.14.RELEASE to 1.1.0
Bumps [io.spring.dependency-management](https://github.com/spring-gradle-plugins/dependency-management-plugin) from 1.0.14.RELEASE to 1.1.0.
- [Release notes](https://github.com/spring-gradle-plugins/dependency-management-plugin/releases)
- [Commits](https://github.com/spring-gradle-plugins/dependency-management-plugin/compare/v1.0.14.RELEASE...v1.1.0)

---
updated-dependencies:
- dependency-name: io.spring.dependency-management
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-19 06:26:00 +00:00
Sambo Chea
c2fb8adac0
Merge pull request #35 from CUBETIQ/dependabot/gradle/org.springdoc-springdoc-openapi-ui-1.6.12
Bump springdoc-openapi-ui from 1.6.11 to 1.6.12
2022-10-18 10:44:34 +07:00
dependabot[bot]
a2e7980eec
Bump springdoc-openapi-ui from 1.6.11 to 1.6.12
Bumps [springdoc-openapi-ui](https://github.com/springdoc/springdoc-openapi) from 1.6.11 to 1.6.12.
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/springdoc/springdoc-openapi/compare/v1.6.11...v1.6.12)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-ui
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-17 06:27:02 +00:00
11 changed files with 54 additions and 38 deletions

4
.gitignore vendored
View File

@ -36,4 +36,6 @@ out/
### VS Code ### ### VS Code ###
.vscode/ .vscode/
.DS_Store .DS_Store
uploads/

View File

@ -9,9 +9,9 @@
### Language and Framework ### Language and Framework
- Spring Boot: 2.7.4 - Spring Boot: 3.0.0
- Kotlin: 1.7.20 - Kotlin: 1.7.22
- Gradle: 7.5 - Gradle: 7.5.1
# Modules # Modules

View File

@ -8,8 +8,8 @@ plugins {
kotlin("plugin.jpa") kotlin("plugin.jpa")
} }
val kotlinVersion = "1.7.20" val kotlinVersion = "1.7.22"
val springBootVersion = "2.7.4" val springBootVersion = "3.0.0"
// find the last commit // find the last commit
fun getGitHashLastCommit(): String { fun getGitHashLastCommit(): String {
@ -25,9 +25,9 @@ fun getGitHashLastCommit(): String {
springBoot { springBoot {
buildInfo { buildInfo {
properties { properties {
additional["commitId"] = getGitHashLastCommit() this.additional.put("commitId", getGitHashLastCommit())
additional["springBootVersion"] = springBootVersion this.additional.put("springBootVersion", springBootVersion)
additional["kotlinVersion"] = kotlinVersion this.additional.put("kotlinVersion", kotlinVersion)
} }
} }
} }
@ -36,9 +36,10 @@ dependencies {
// Spring Data JPA (Required for Database Layer) // Spring Data JPA (Required for Database Layer)
implementation("org.springframework.boot:spring-boot-starter-data-jpa") implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-data-redis") implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.boot:spring-boot-starter-validation")
// Migrating from SpringFox // Migrating from SpringDoc API (Swagger) for Support Spring Boot 3.x
implementation("org.springdoc:springdoc-openapi-ui:1.6.11") implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.0")
// SPRING FRAMEWORK AND CORE // SPRING FRAMEWORK AND CORE
implementation("org.springframework.boot:spring-boot-starter-web") implementation("org.springframework.boot:spring-boot-starter-web")

View File

@ -6,12 +6,12 @@ import io.swagger.v3.oas.annotations.security.SecurityScheme
import io.swagger.v3.oas.models.OpenAPI import io.swagger.v3.oas.models.OpenAPI
import io.swagger.v3.oas.models.info.Info import io.swagger.v3.oas.models.info.Info
import io.swagger.v3.oas.models.info.License import io.swagger.v3.oas.models.info.License
import org.springdoc.core.GroupedOpenApi
import org.springframework.beans.factory.annotation.Autowired import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration import org.springframework.context.annotation.Configuration
import io.swagger.v3.oas.annotations.OpenAPIDefinition import io.swagger.v3.oas.annotations.OpenAPIDefinition
import io.swagger.v3.oas.annotations.servers.Server import io.swagger.v3.oas.annotations.servers.Server
import org.springdoc.core.models.GroupedOpenApi
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
//import org.springdoc.core.SpringDocUtils //import org.springdoc.core.SpringDocUtils

View File

@ -10,6 +10,6 @@ import org.springframework.web.servlet.view.RedirectView
class ApiDoc { class ApiDoc {
@GetMapping(value = [ "/api-doc", "/api-docs"]) @GetMapping(value = [ "/api-doc", "/api-docs"])
fun redirect(): RedirectView { fun redirect(): RedirectView {
return RedirectView("/swagger-ui/") return RedirectView("/swagger-ui/index.html")
} }
} }

View File

@ -14,7 +14,7 @@ import org.springframework.util.FileCopyUtils
import org.springframework.web.bind.annotation.* import org.springframework.web.bind.annotation.*
import org.springframework.web.multipart.MultipartFile import org.springframework.web.multipart.MultipartFile
import java.util.* import java.util.*
import javax.servlet.http.HttpServletResponse import jakarta.servlet.http.HttpServletResponse
@UploaderModule @UploaderModule
@Tag(name = "Uploader Controller") @Tag(name = "Uploader Controller")

View File

@ -12,40 +12,47 @@ import java.io.InputStream
import java.io.Serializable import java.io.Serializable
import java.nio.file.Files import java.nio.file.Files
import java.util.* import java.util.*
import javax.persistence.* import jakarta.persistence.*
import org.hibernate.annotations.GenericGenerator
@UploaderModule @UploaderModule
@Entity @Entity
@Table(name = "uploader") @Table(name = "`uploader`")
@EntityListeners(AuditingEntityListener::class) @EntityListeners(AuditingEntityListener::class)
open class UploaderEntity( open class UploaderEntity(
@Id @Id
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(generator = "custom-uuid")
@GenericGenerator(
name = "custom-uuid",
strategy = "org.hibernate.id.UUIDGenerator",
parameters = [org.hibernate.annotations.Parameter(name = "uuid_gen_strategy_class", value = "org.hibernate.id.uuid.CustomVersionOneStrategy")]
)
@Column(columnDefinition = "BINARY(16)")
open var id: UUID? = null, open var id: UUID? = null,
@Column(name = "filename") @Column(name = "`filename`")
open var filename: String? = null, open var filename: String? = null,
@Column(name = "content_type") @Column(name = "`content_type`")
open var contentType: String? = null, open var contentType: String? = null,
@Column(name = "content_length") @Column(name = "`content_length`")
open var contentLength: Long? = null, open var contentLength: Long? = null,
@Column(name = "path", length = 300) @Column(name = "`path`", length = 300)
open var path: String? = null, open var path: String? = null,
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = "created_at") @Column(name = "`created_at`")
@CreatedDate @CreatedDate
open var createdAt: Date? = null, open var createdAt: Date? = null,
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = "updated_at") @Column(name = "`updated_at`")
@LastModifiedDate @LastModifiedDate
open var updatedAt: Date? = null, open var updatedAt: Date? = null,
@Column(length = 30) @Column(length = 30, name = "`provider_type`")
open var providerType: String? = null, open var providerType: String? = null,
) : Serializable { ) : Serializable {
@Transient @Transient

View File

@ -3,20 +3,27 @@ package com.cubetiqs.web.modules.user
import org.hibernate.Hibernate import org.hibernate.Hibernate
import java.io.Serializable import java.io.Serializable
import java.util.* import java.util.*
import javax.persistence.* import jakarta.persistence.*
import org.hibernate.annotations.GenericGenerator
@UserModule @UserModule
@Entity @Entity
@Table(name = "user") @Table(name = "`user`")
open class UserEntity( open class UserEntity(
@Id @Id
@GeneratedValue(strategy = GenerationType.AUTO) @GeneratedValue(generator = "custom-uuid")
@GenericGenerator(
name = "custom-uuid",
strategy = "org.hibernate.id.UUIDGenerator",
parameters = [org.hibernate.annotations.Parameter(name = "uuid_gen_strategy_class", value = "org.hibernate.id.uuid.CustomVersionOneStrategy")]
)
@Column(columnDefinition = "BINARY(16)")
open var id: UUID? = null, open var id: UUID? = null,
@Column(name = "name", length = 50) @Column(name = "`name`", length = 50)
open var name: String? = null, open var name: String? = null,
@Column(name = "username", length = 50, unique = true) @Column(name = "`username`", length = 50, unique = true)
open var username: String? = null, open var username: String? = null,
) : Serializable { ) : Serializable {
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {

View File

@ -27,8 +27,9 @@ spring:
password: ${DATASOURCE_PASSWORD:password} password: ${DATASOURCE_PASSWORD:password}
jpa: jpa:
hibernate: hibernate:
ddl-auto: ${JPA_HIBERNATE_DDL_AUTO:update} ddl-auto: ${JPA_HIBERNATE_DDL_AUTO:create-drop}
open-in-view: ${JPA_OPEN_IN_VIEW:false} open-in-view: ${JPA_OPEN_IN_VIEW:false}
database-platform: ${JPA_DATABASE_PLATFORM:org.hibernate.dialect.H2Dialect}
data: data:
redis: redis:
repositories: repositories:
@ -55,5 +56,3 @@ logging:
springdoc: springdoc:
api-docs: api-docs:
enabled: ${API_DOCS_ENABLED:true} enabled: ${API_DOCS_ENABLED:true}
swagger-ui:
path: /swagger-ui

View File

@ -1,11 +1,11 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins { plugins {
id("org.springframework.boot") version "2.7.4" apply false id("org.springframework.boot") version "3.0.0" apply false
id("io.spring.dependency-management") version "1.0.14.RELEASE" apply false id("io.spring.dependency-management") version "1.1.0" apply false
kotlin("jvm") version "1.7.20" apply false kotlin("jvm") version "1.7.22" apply false
kotlin("plugin.spring") version "1.7.20" apply false kotlin("plugin.spring") version "1.7.22" apply false
kotlin("plugin.jpa") version "1.7.20" apply false kotlin("plugin.jpa") version "1.7.22" apply false
} }
allprojects { allprojects {

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.5-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists