GiantSnail GiantSnail 图片可能不稳定 xxx@xxx:~$ cat ~/.halo/application.yaml server: port: 8080 spring: datasource: type: com.zaxxer.hikari.HikariDataSource # MySQL 配置,如果你需要使用 H2Database,请注释掉该配置并取消注释上方 H2Database 的配置。 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/halodb?characterEncoding=utf8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: xxx password: xxx halo: admin-path: snail xxx@xxx:~$ sudo cat /etc/systemd/system/halo.service [sudo] xxx 的密码: Description=Halo Service Documentation=https://halo.run After=network-online.target Wants=network-online.target [Service] Type=simple ExecStart=java -server -Xms2048m -Xmx4096m -jar /home/wht/applications/halo-1.3.2.jar ExecStop=/bin/kill -s QUIT $MAINPID Restart=always StandOutput=syslog StandError=inherit [Install] WantedBy=multi-user.target
zhangfeibiao 是的,我在linux环境根据文档执行systemctl start halo后,部署的配置文件是默认的配置 然而如果切换到halo用户,直接java -jar启动是读自定义配置,也就是~/.halo/application.yaml