diff --git a/build.gradle b/build.gradle index 19a4a9a..bf14aa7 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.4.5' + id 'war' + id 'org.springframework.boot' version '3.4.5' apply false id 'io.spring.dependency-management' version '1.1.7' } @@ -17,11 +18,25 @@ repositories { mavenCentral() } +apply plugin: 'org.springframework.boot' +apply plugin: 'io.spring.dependency-management' +apply plugin: 'war' + +bootWar { + enabled = true +} + +bootJar { + enabled = false +} + dependencies { + providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' implementation 'org.springframework.boot:spring-boot-starter-jdbc' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:3.0.4' + implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16' runtimeOnly 'com.ibm.db2:jcc' runtimeOnly 'com.microsoft.sqlserver:mssql-jdbc' runtimeOnly 'com.mysql:mysql-connector-j' @@ -32,6 +47,7 @@ dependencies { testImplementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter-test:3.0.4' testImplementation 'org.springframework.security:spring-security-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' + annotationProcessor 'org.projectlombok:lombok' } tasks.named('test') { diff --git a/src/main/front/vite.config.js b/src/main/front/vite.config.js index bbcf80c..31d7210 100644 --- a/src/main/front/vite.config.js +++ b/src/main/front/vite.config.js @@ -4,4 +4,15 @@ import vue from '@vitejs/plugin-vue' // https://vite.dev/config/ export default defineConfig({ plugins: [vue()], + base: '/', + build: { + outDir: '../resources/static', + rollupOptions: { + output: { + entryFileNames: '[name]-[hash].js', + chunkFileNames: '[name]-[hash].js', + assetFileNames: '[name]-[hash][extname]' + }, + }, + }, }) diff --git a/src/main/java/com/bsmlab/dfx/dfxconsole/DfxconsoleApplication.java b/src/main/java/com/bsmlab/dfx/dfxconsole/DfxconsoleApplication.java index 864a20f..26edaba 100644 --- a/src/main/java/com/bsmlab/dfx/dfxconsole/DfxconsoleApplication.java +++ b/src/main/java/com/bsmlab/dfx/dfxconsole/DfxconsoleApplication.java @@ -2,12 +2,19 @@ package com.bsmlab.dfx.dfxconsole; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication -public class DfxconsoleApplication { +public class DfxconsoleApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(DfxconsoleApplication.class, args); } + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { + return builder.sources(DfxconsoleApplication.class); + } + } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 0000000..478c57d --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,57 @@ +spring: + application: + name: dfxconsole + devtools: + restart: + enabled: true + additional-paths: src/main/resources + livereload: + enabled: true + datasource: + driver-class-name: net.sf.log4jdbc.sql.jdbcapi.DriverSpy + url: jdbc:log4jdbc:postgresql://bsm-lab.com:5432/defree?currentSchema=DFCMS + username: defreeadmin + password: qortpals1! + +server: + servlet: + context-path: / + encoding: + charset: utf-8 + enabled: true + force: true + multipart: + max-file-size: 500MB + max-request-size: 500MB + session: + timeout: 43200m + cookie: + max-age: 43200m + name: SID + http-only: true + secure: false + error: + whitelabel.enabled: true + include-exception: true + include-message: always + include-stacktrace: always + port: 18080 + +mybatis: + configuration: + map-underscore-to-camel-case: true + call-setters-on-nulls: true + jdbc-type-for-null: NULL + use-generated-keys: true + mapper-locations: /mapper/**/*.xml + +logging: + level: + jdbc: + resultsettable: off + resultset: off + audit: off + connection: off + sqlonly: debug + sqltiming: off + com.bsmlab.dfcms: debug