- Add Gradle wrapper files for project setup. - Create main application class for Spring Boot. - Implement CORS configuration for API. - Add system information controller and service to fetch system stats. - Define data transfer objects for system stats. - Configure application properties for server port and name. - Add unit test for application context loading. - Create example environment file for frontend API base URL.
34 lines
819 B
Groovy
34 lines
819 B
Groovy
plugins {
|
|
id 'java'
|
|
id 'org.springframework.boot' version '4.1.0'
|
|
id 'io.spring.dependency-management' version '1.1.7'
|
|
}
|
|
|
|
group = 'cn.xiaozhou233.workstation'
|
|
version = '0.0.1-SNAPSHOT'
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(17)
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'org.springframework.boot:spring-boot-starter-webmvc'
|
|
compileOnly 'org.projectlombok:lombok'
|
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
|
annotationProcessor 'org.projectlombok:lombok'
|
|
testImplementation 'org.springframework.boot:spring-boot-starter-webmvc-test'
|
|
testCompileOnly 'org.projectlombok:lombok'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
|
|
testAnnotationProcessor 'org.projectlombok:lombok'
|
|
}
|
|
|
|
tasks.named('test') {
|
|
useJUnitPlatform()
|
|
}
|