项目修改

This commit is contained in:
彭勇平 2025-02-26 21:43:18 +08:00
parent f3e5078c57
commit 0500ce708f
6 changed files with 37 additions and 11 deletions

25
Dockerfile Normal file
View file

@ -0,0 +1,25 @@
FROM java:8u111-jdk
#作者
LABEL maintainer="peng"
# 设置工作目录
WORKDIR /app
#容器数据卷,用于数据保存和持久化工作,可为 Spring Boot 临时文件提供持久化存储
VOLUME /tmp
# 设置环境变量
ENV LANG C.UTF-8
ENV TZ "Asia/Shanghai"
COPY target/songshui.jar /app/app.jar
# 暴露端口(与 Spring Boot 配置一致)
EXPOSE 8964
# 在镜像运行为容器后执行的命令
ENTRYPOINT ["sh","-c","java ${APP_OPTS} -jar /app/app.jar ${APP_PARMS}"]

View file

@ -9,8 +9,6 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@Slf4j @Slf4j
@EnableScheduling @EnableScheduling
@EnableAsync
@EnableTransactionManagement
@SpringBootApplication @SpringBootApplication
public class SqxApplication { public class SqxApplication {

View file

@ -57,7 +57,7 @@ public class ShiroConfig {
filterMap.put("/swagger-ui.html", "anon"); filterMap.put("/swagger-ui.html", "anon");
filterMap.put("/swagger-ui/*", "anon"); filterMap.put("/swagger-ui/*", "anon");
filterMap.put("/swagger-resources/**", "anon"); filterMap.put("/swagger-resources/**", "anon");
filterMap.put("/captcha.jpg", "anon"); filterMap.put("/sys/captcha", "anon");
filterMap.put("/chatSocket/**", "anon"); filterMap.put("/chatSocket/**", "anon");
filterMap.put("/websocket/**", "anon"); filterMap.put("/websocket/**", "anon");
filterMap.put("/search/**", "anon"); filterMap.put("/search/**", "anon");

View file

@ -37,7 +37,7 @@ public class SysLoginController extends AbstractController {
/** /**
* 验证码 * 验证码
*/ */
@GetMapping("captcha.jpg") @GetMapping("/sys/captcha")
public void captcha(HttpServletResponse response, String uuid)throws IOException { public void captcha(HttpServletResponse response, String uuid)throws IOException {
response.setHeader("Cache-Control", "no-store, no-cache"); response.setHeader("Cache-Control", "no-store, no-cache");
response.setContentType("image/jpeg"); response.setContentType("image/jpeg");

View file

@ -3,9 +3,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
druid: druid:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/songshui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT url: jdbc:mysql://${DB_URL:127.0.0.1}:3306/songshui?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
username: root username: ${DB_NAME}
password: 123456 password: ${DB_PASSWORD}
initial-size: 10 initial-size: 10
max-active: 100 max-active: 100
min-idle: 10 min-idle: 10

View file

@ -1,6 +1,3 @@
logging:
file:
name: logs/songshui.log
# Tomcat # Tomcat
server: server:
tomcat: tomcat:
@ -86,3 +83,9 @@ sqx:
# token有效时长7天单位秒 # token有效时长7天单位秒
expire: 2592000 expire: 2592000
header: token header: token
logging:
level:
root: info
file:
name: songshui.log