国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? Java java?? ?? ?? ?? Gradle ????? ?? ?? ??????(?? ????)

?? ?? Gradle ????? ?? ?? ??????(?? ????)

Jan 19, 2025 am 08:05 AM

Flyway? ???? Java?? ?????? ?????? ???

?????? ??????? ?? CI/CD(???? ?? ? ??)? ?? ??? ???? ????? ??? ??? ?????. ??????? ???? ???? ?? ??????? ???? ?????? ???? ???????. ??? ??? ?? ??? ???? ???? ??? ???? ??? ??? ??? ? ????.

?????? ??????? ????? ?? ???? ??? ?? ?? ??? Flyway? ?????. Flyway? ??????? ?? ??? ???? ???? ???? ????? ??????? ? ??? ???. ? ????? Flyway? ???? ?? ?? Gragle Java ?????? ?????? ??????? ????? ?????? ?? ??? ????? ?? ?? ????? ??? ?? ??? ???????.

????? ?? ??? ??

Gradle? ?? ???? ?? ??

?? ??? ????? ???? ??????? ??? ?? ??? ?? ?? ??? ??? ? ??? ??? ????? ?? ???? ?? ??? ???? ??? ????. ???? "?????"??? ??? ????, ?? ?? ????? ?? ??? ??? ???? ??? ?? ?????.

Gradle? ?? ?? ??????? ?? ?? ???? ?? ??? ?? ??? ??? ?????. Gradle ???? ??? ??? ?? ?????? ???.

?? ???? ??? ??? ?? ????? ???? ???? ? ??? ?? ?? ????? ??? ? ????.

gradle project

???? ??? ??? ??? ???.

├── .gradle
│   └── ?
├── gradle
│   ├── libs.versions.toml
│   └── wrapper
├── gradlew
├── gradlew.bat
├── settings.gradle.kts (1)
├── sub-project-1
│   └── build.gradle.kts (2) 
├── sub-project-2
│   └── build.gradle.kts (2) 
└── sub-project-3
    └── build.gradle.kts (2)

(1) settings.gradle.kts ???? ?? ?? ????? ????? ???.
(2) ? ?? ?????? ?? build.gradle.kts ??? ??? ???.

?? ????? ?? Gradle ?? ?? ??

?? ????? ??? ??? ???? ?????? ? ?? ?? ???? ???? ? ??? ?? ??? ?????. ?????? ? ????? ???? ???? ?? ? ??? Gradle? ?? ?? ??? ???? ?????? ???? ????. Clean Architecture? Gradle ?? ??? ???? ??? ??? ????.

?? ???? ???:
??:

  • ???? ??, ??? ??, ?????? ??? ???? ????. ??? ?? ???? ????.
  • ??? ?? ?????? ??? ?????? ???.

??:

  • ?????? ???????? ?? ??? ?? ??? ?? ?? ???? ??? ?????.
  • ???? ??? ?? Core? ??? ? ??? ?? ????? ? ???.

?:

  • REST API? ???? HTTP ??? ???? ???.
  • ???? ??? Core? ???? ??? ??? ??? ? ????.
├── .gradle
│   └── ?
├── gradle
│   ├── libs.versions.toml
│   └── wrapper
├── gradlew
├── gradlew.bat
├── settings.gradle.kts (1)
├── sub-project-1
│   └── build.gradle.kts (2) 
├── sub-project-2
│   └── build.gradle.kts (2) 
└── sub-project-3
    └── build.gradle.kts (2)

1??: Java ?? Gradle ????? ???? ??? "SchoolStaff"? ?????.

2??: Spring Initializr? ???? Web??? REST API ????? ?????.

3??: Java ?? Gradle ????? ???? ??? External?? ?????.

4??: Java ?? Gradle ????? ???? ??? Core? ?????.

?? build.gradle.kts

SchoolStaff/
├── Core/
│   ├── src/
│   │   └── main/
│   │       ├── java/         # Business logic and domain objects
│   │       └── resources/    # Core-specific resources (if any)
│   └── build.gradle.kts
├── External/
│   ├── src/
│   │   └── main/
│   │       ├── java/         # External integration code
│   │       └── resources/    # db/migration and other external resources
│   └── build.gradle.kts
├── Web/
│   ├── src/
│   │   └── main/
│   │       ├── java/         # REST controllers and entry-point logic
│   │       └── resources/    # Application-specific configuration
│   └── build.gradle.kts
├── build.gradle.kts          # Root Gradle build
└── settings.gradle.kts       # Project module settings

settings.gradle.kts

plugins {
    id("java")
}

allprojects {
    group = "school.staff"
    version = "1.0.0"

    repositories {
        mavenLocal()
        mavenCentral()
    }
}

subprojects {
    apply(plugin = "java")

    dependencies {
        testImplementation(platform("org.junit:junit-bom:5.10.0"))
        testImplementation("org.junit.jupiter:junit-jupiter")
    }

    tasks.test {
        useJUnitPlatform()
    }
}

"?" ????? ??? ???

rootProject.name = "SchoolStaff"

include("Core", "External", "Web")

"Core" ????? ??? ???

dependencies {
    implementation(project(":Core"))
    implementation(project(":External"))
}

"??" ????? ?? ?? ???

dependencies {
    runtimeOnly(project(":External"))
}

??? Flyway ??????? ?? ?? ????? ?????:

import java.sql.DriverManager
import java.util.Properties
// Function to load properties based on the environment
fun loadProperties(env: String): Properties {
    val properties = Properties()
    val propsFile = file("../web/src/main/resources/application-$env.properties")

    if (propsFile.exists()) {
        propsFile.inputStream().use { properties.load(it) }
    } else {
        throw GradleException("Properties file for environment '$env' not found: ${propsFile.absolutePath}")
    }

    return properties
}
// Set the environment (default is 'dev' if no argument is passed)
val env = project.findProperty("env")?.toString() ?: "dev"

// Load properties for the chosen environment
val dbProps = loadProperties(env)
buildscript {
    dependencies {
        classpath("org.flywaydb:flyway-database-postgresql:11.1.0") // This is required for the flyway plugin to work on the migration, otherwise it will throw an error as No Database found
        classpath("org.postgresql:postgresql:42.7.4")
    }
}
plugins {
    id("java-library")
    id("org.flywaydb.flyway") version "11.0.1"
}

group = "school.staff"
version = "unspecified"

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-data-jpa:3.4.0")
    implementation("org.postgresql:postgresql:42.7.4")
    implementation("org.flywaydb:flyway-core:11.0.1")
    implementation("org.flywaydb:flyway-database-postgresql:11.0.1")
    implementation("org.flywaydb:flyway-gradle-plugin:11.0.1")

    implementation (project(":Core"))
    testImplementation(platform("org.junit:junit-bom:5.10.0"))
    testImplementation("org.junit.jupiter:junit-jupiter")
}

tasks.test {
    useJUnitPlatform()
}

// Task to create the database if it doesn't exist
tasks.register("createDatabase") {
    doLast {
        val dbUrl = dbProps["spring.datasource.url"] as String
        val dbUsername = dbProps["spring.datasource.username"] as String
        val dbPassword = dbProps["spring.datasource.password"] as String

        // Extract the base URL and database name
        val baseDbUrl = dbUrl.substringBeforeLast("/")+ "/"
        val dbName = dbUrl.substringAfterLast("/")

        // Connect to the PostgreSQL server (without the specific database)
        DriverManager.getConnection(baseDbUrl, dbUsername, dbPassword).use { connection ->
            val stmt = connection.createStatement()
            val resultSet = stmt.executeQuery("SELECT 1 FROM pg_database WHERE datname = '$dbName'")
            if (!resultSet.next()) {
                println("Database '$dbName' does not exist. Creating it...")
                stmt.executeUpdate("CREATE DATABASE \"$dbName\"")
                println("Database '$dbName' created successfully.")
            } else {
                println("Database '$dbName' already exists.")
            }
        }
    }
}

flyway {
    url = dbProps["spring.datasource.url"] as String
    user = dbProps["spring.datasource.username"] as String
    password = dbProps["spring.datasource.password"] as String
    locations = arrayOf("classpath:db/migration")
    baselineOnMigrate = true
}

 //Ensure classes are built before migration
tasks.named("flywayMigrate").configure {
    dependsOn(tasks.named("createDatabase"))
    dependsOn(tasks.named("classes"))
}

? ?? ??? ???? ???? ??????? ????? ???? ??? ?? ?????. ??????? ??? ??? ???? ??????? ???? ?? ??? ???? ??????? ???? ? ? ???? ???? ?????.

?? Spring ??????? application.properties ??? ???? ?????? ?? ? ?? ??? ???? ????. BaselineOnMigrate = true ??? ?? ??????? ?? ??????? ???? ????? ?????.

 plugins {
    id("org.flywaydb.flyway") version "11.0.1"
}

JPA Buddy? ???? ?? ????? resources/db/migration ???? ?? ?? ?????? ??? ??? ? ????.

V1__Initial_Migration

flyway {
    url = dbProps["spring.datasource.url"] as String
    user = dbProps["spring.datasource.username"] as String
    password = dbProps["spring.datasource.password"] as String
    locations = arrayOf("classpath:db/migration")
    baselineOnMigrate = true
}

?? ?????? ?? ??? ???? Flyway ??????? ??? ? ????.

CREATE TABLE _user
(
    id                 UUID NOT NULL,
    created_by         UUID,
    created_date       TIMESTAMP WITH TIME ZONE,
    last_modified_by   UUID,
    last_modified_date TIMESTAMP WITH TIME ZONE,
    first_name         VARCHAR(255),
    last_name          VARCHAR(255),
    email              VARCHAR(255),
    password           VARCHAR(255),
    tenant_id          UUID,
    CONSTRAINT pk__user PRIMARY KEY (id)
);

??? ?? ?? ?????? ??? ??????? ?????.

??

Gradle ?? ?? ???? ??? Flyway? ???? ?????? ??????? ????? ??? ???????. ?? CI/CD ???? ??? ???? ???? ? ?????.

?? Gradle? ?? ???? ??? ???? ??? ????? ?? ??? ?? ????? ???? ?? ??? ?? ??? ??? ?? ?? ???? ?? ???? ??? ??????.

????? Clean Architecture? Gradle ??? ???? ????? ??, ?? ? ? ???? ???? ?? ??? ??? ??? ???? ??????.

??? ??? ???, ???, ?? ?? ???? ???? ?? ???? ?? ?? ????? ??? ?? ??? ?????.

? ??? ?? ?? Gradle ????? ?? ?? ??????(?? ????)? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

?? ????
1783
16
Cakephp ????
1727
56
??? ????
1577
28
PHP ????
1442
31
???
?? ?? ?? ??? ??? ?? ?? ?? ??? ??? Jun 24, 2025 pm 09:41 PM

?? ?? ?? ??? ??? ?? ??? ??, ? ? ?? ? ??? ?????. 1. ??? ?? ???? ?? ???? ???-????, ? ??? ??? ??? ? ????, Hashmap? ???-??? ?? ??? ??? ???? ????. 2. NULL ? ?? ???? HashMap? ??? NULL ?? ?? ? ?? ???? ?? HashTable? NULL ?? ?? ???? ??? NullPointerException? ?????. 3. ????? ??? ????? ?? ??? ?? ?? ? ????? HashTable? ? ??? ?? ?? ??? ????. ?? ConcurrenTashMap? ???? ?? ????.

?? ???? ??? ??? ?????? ?? ???? ??? ??? ?????? Jun 28, 2025 am 01:01 AM

Java? ?? ??? ??? ?? ??? ??? ?? ??? ??? ?? ??? ?? ?? ??? ???? ??? ?? ???? ?????. 1. ??? ???? ??? ?? ?? ? ???? ?? ??? ???? ?? ?? ??? ? ????. 2. ???? ?? ??? ???? ??? ?? ???? ?? ?? ??? ???????. 3. ?? ???? ?? ?? ?? ? ???? ???? ?? NULL ?? ??? ? ????. 4. ?? ???? ??? ?? ?? ? ??? ?????? ?? ??? ??? ?? ?? ??? ????? ??? ??? ??? ??????? ?? ???? ??????.

JIT ????? ??? ??? ??????? JIT ????? ??? ??? ??????? Jun 24, 2025 pm 10:45 PM

JIT ????? ??? ???, ??? ?? ? ???, ?? ?? ? ???? ? ? ?? ?? ??? ? ?? ??? ?? ??? ??????. 1. ??? ???? ?? ?? ??? ??? ?? ?? ???? ??? ?? ?????. 2. ??? ?? ? ??? ?? ?? ? ??? ???? ?? ?? ???; 3. ?? ??? ??? ?? ??? ???? ???? ???? ? ?? ?? ??? ?????. 4. ?? ??? ?? ??? ??? ???? ???? ?? ? ??? ???? ?? ??? ?????.

?????? ?? ???? ?????? ?????? ?? ???? ?????? Jun 24, 2025 pm 10:57 PM

staticmethodsininterfaceswereIntRectionSelffacesswithinteffaceswithinteffaceswithintintinjava8toallowutilityFunctionswithinterfaceitswithinteffaceswithinterfaceffaces

???? ??? ??? ??? ?????? ???? ??? ??? ??? ?????? Jun 25, 2025 pm 12:21 PM

???? ??? ??? Java?? ??? ?? ???? ??? ?? ? ? ??? ??? ???? ? ?????. ?? ???? ??? ??, ??? ?? ??? ?? ?? ??? ??? ????? ???? ????? ?????. ?? ??? ??? ??, ????? ? ??? ????, ?? ??? ??? ?????? ? ?? ? ?? ?????.

??? '??'???? ?????? ??? '??'???? ?????? Jun 24, 2025 pm 07:29 PM

injava, thefinalkeywordpreventsavariable'svalue'svalueffrombeingchangedafterassignment, butitsbehaviordiffersforprimitivesandobjectreences.forprimitivevariables, asinfinalintmax_speed = 100; wherereassoncesanerror.forobjectref

?? ??? ?????? ?? ??? ?????? Jun 24, 2025 pm 11:29 PM

??? ??? ?? ?? ??? ????? ? ???? ????? ???? ?? ???? ?? ???? ?????. ?? ??? ??? ????. ?? ?? ?? ??? ???? ???? ?? ?? ??? ??? ?? ?? ??? ??? ?????. ?? ??? ??? ????. ?? ??? ?? ??? ?? ?? ??? ?? ?? ??? ???? NewClass ()? ??? ?? ???? ????. ?? ??? ?? ??? ???? ?? ??? ?? ? ? ??? ?? ?? ??? ????? ????? ?????. ?? ??, ?? ?????? ?????, ??? ? ?? ????? ??? ?? ?????. ???? ?? ?? ??? ???? ?? ???? ?? ? ??? ???? ?? ??? ?? ?????? ?????. ???? ???? ??? ??, ?? ?? ? ?? ??? ????, ?? ?? ???? ?????.

?? ????? ?????? ?? ????? ?????? Jun 24, 2025 pm 11:09 PM

??? ? ?? ??? ???? : ????? ?? ?. 1. int? ???? ???? ?? ?? ?? ? ??? ???? ?????. 2. ?? ? ???? (int) myDouble ??? ?? ?? ??? ?????. ?? ??? ??? ?? ??? ?? ??, ?? ?? ?? ???? ?? ??? ?? ???? ?? ?????. ???? ? ??? ??? ????. ?? ??? ??? ??? ??? ??? ?? ??? ??? ? ??? ?? ???? ??? ??? ??? ??? ? ??? ?? ??? ?? ??? ?? ?? ? ? ????. ?? ?? ??? ?? ??? ??? ??? ??? ? ??????.

See all articles