Refactor API URLs to use GlobalConstants and update CORS configurations for production
This commit is contained in:
+49
-1
@@ -15,6 +15,7 @@ java {
|
||||
}
|
||||
|
||||
repositories {
|
||||
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -37,6 +38,9 @@ dependencies {
|
||||
|
||||
implementation 'org.springframework.ai:spring-ai-zhipuai-spring-boot-starter:1.0.0-M6'
|
||||
|
||||
|
||||
|
||||
|
||||
//implementation 'org.springframework.ai:spring-ai-starter-model-zhipuai'
|
||||
//implementation 'org.springframework.ai:spring-ai-zhipuai-spring-boot-starter'
|
||||
//implementation platform("org.springframework.ai:spring-ai-bom:1.0.0-SNAPSHOT")
|
||||
@@ -94,8 +98,52 @@ apply plugin: 'java'
|
||||
}
|
||||
}*/
|
||||
|
||||
tasks.register('buildAngular_dev', Exec) {
|
||||
//dependsOn deleteStaticFolder
|
||||
workingDir './jambotron-ui' // Path to your Angular project (e.g., './angular-app')
|
||||
executable 'npm.cmd' // Use 'npm' for Unix-like systems or 'npm.cmd' for Windows
|
||||
|
||||
// Your Angular build command
|
||||
args = ['run', 'build_dev']//do not forget build_dev used port 8080 for connect to backend rest api
|
||||
|
||||
}
|
||||
|
||||
tasks.register('buildAngular', Exec) {
|
||||
//dependsOn deleteStaticFolder
|
||||
workingDir './jambotron-ui' // Path to your Angular project (e.g., './angular-app')
|
||||
executable 'npm.cmd' // Use 'npm' for Unix-like systems or 'npm.cmd' for Windows
|
||||
|
||||
// Your Angular build command
|
||||
args = ['run', 'build']//do not forget build_dev used port 8080 for connect to backend rest api
|
||||
|
||||
}
|
||||
|
||||
|
||||
tasks.register('deleteStaticFolder', Delete) {
|
||||
dependsOn buildAngular
|
||||
def dirName = "src/main/resources/static"
|
||||
file(dirName).list().each {
|
||||
f ->
|
||||
delete "${dirName}/${f}"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('deleteStaticFolder_dev', Delete) {
|
||||
dependsOn buildAngular_dev
|
||||
def dirName = "src/main/resources/static"
|
||||
file(dirName).list().each {
|
||||
f ->
|
||||
delete "${dirName}/${f}"
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register('copyAngularBuild', Copy) {
|
||||
//dependsOn buildAngular
|
||||
dependsOn deleteStaticFolder
|
||||
from 'jambotron-ui/dist/jambotron-ui' // Path to your Angular dist folder
|
||||
into "src/main/resources/static" // Path INSIDE the WAR
|
||||
}
|
||||
tasks.register('copyAngularBuild_dev', Copy) {
|
||||
dependsOn deleteStaticFolder_dev
|
||||
from 'jambotron-ui/dist/jambotron-ui' // Path to your Angular dist folder
|
||||
into "src/main/resources/static" // Path INSIDE the WAR
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user