fix: 生产环境web静态资源目录配置

This commit is contained in:
xiongxiaoyang 2025-03-18 20:22:54 +08:00
parent 3858cd4e49
commit f5a9a7423f
3 changed files with 3 additions and 11 deletions

View File

@ -27,9 +27,6 @@ spring:
max-file-size: 100MB max-file-size: 100MB
max-request-size: 100MB max-request-size: 100MB
devtools:
restart:
enabled: true
main: main:
allow-bean-definition-overriding: true allow-bean-definition-overriding: true
@ -39,9 +36,6 @@ mybatis:
map-underscore-to-camel-case: true map-underscore-to-camel-case: true
mapper-locations: mybatis/**/*Mapper.xml mapper-locations: mybatis/**/*Mapper.xml
typeAliasesPackage: com.java2nb.**.domain typeAliasesPackage: com.java2nb.**.domain
#[弃用]配置缓存和session存储方式默认ehcache,可选redis,[弃用]调整至 spring cache typeshiro.用户权限sessionspring.cache通用
#[弃用]cacheType: ehcache
logging: logging:
config: classpath:logback-boot.xml config: classpath:logback-boot.xml

View File

@ -2,9 +2,6 @@ spring:
datasource: datasource:
url: jdbc:shardingsphere:absolutepath:${user.dir}/config/shardingsphere-jdbc.yml url: jdbc:shardingsphere:absolutepath:${user.dir}/config/shardingsphere-jdbc.yml
driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
cache:
ehcache:
config: classpath:ehcache.xml
thymeleaf: thymeleaf:
mode: LEGACYHTML5 #去除thymeleaf的html严格校验thymeleaf.mode=LEGACYHTML5 mode: LEGACYHTML5 #去除thymeleaf的html严格校验thymeleaf.mode=LEGACYHTML5
cache: false # 是否开启模板缓存默认true,建议在开发时关闭缓存,不然没法看到实时 cache: false # 是否开启模板缓存默认true,建议在开发时关闭缓存,不然没法看到实时

View File

@ -3,12 +3,13 @@ spring:
import: classpath:application-common-prod.yml import: classpath:application-common-prod.yml
#静态文件路径配置 #静态文件路径配置
resources:
static-locations: file:${user.dir}/templates/${templates.name}/static/
#thymeleaf模版路径配置 #thymeleaf模版路径配置
thymeleaf: thymeleaf:
prefix: file:${user.dir}/templates/${templates.name}/html/ prefix: file:${user.dir}/templates/${templates.name}/html/
suffix: .html suffix: .html
web:
resources:
static-locations: file:${user.dir}/templates/${templates.name}/static/
#模版配置 #模版配置
templates: templates: