mirror of
https://gitee.com/mmsAdmin/mms
synced 2025-12-06 17:08:54 +08:00
发布
This commit is contained in:
parent
5518c2d368
commit
9e5503c0e8
@ -1,46 +0,0 @@
|
|||||||
package com.sxpcwlkj;
|
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.dromara.x.file.storage.spring.EnableFileStorage;
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.context.ConfigurableApplicationContext;
|
|
||||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
|
||||||
import org.springframework.core.env.Environment;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.UnknownHostException;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author mmsAdmin
|
|
||||||
*/
|
|
||||||
@SpringBootApplication
|
|
||||||
@Slf4j
|
|
||||||
@EnableAspectJAutoProxy(exposeProxy = true)
|
|
||||||
@MapperScan(basePackages = {"com.sxpcwlkj.**.mapper"})
|
|
||||||
@EnableFileStorage
|
|
||||||
public class MmsAdminApplication {
|
|
||||||
|
|
||||||
public static void main(String[] args) throws UnknownHostException {
|
|
||||||
|
|
||||||
ConfigurableApplicationContext applicationContext = SpringApplication.run(MmsAdminApplication.class, args);
|
|
||||||
Environment env = applicationContext.getEnvironment();
|
|
||||||
System.out.println("后端: 系统启动成功,当前环境为: " + env.getProperty("spring.profiles.active"));
|
|
||||||
log.info("\n----------------------------------------------------------\n\t" +
|
|
||||||
"Application '{}' is running! Access URLs:\n\t" +
|
|
||||||
"Local: \t\thttp://localhost:{}\n\t" +
|
|
||||||
"External: \thttp://{}:{}\n\t" +
|
|
||||||
"Doc: \t\t{}\n" +
|
|
||||||
"----------------------------------------------------------",
|
|
||||||
env.getProperty("sxpcwlkj.name"),
|
|
||||||
env.getProperty("server.port"),
|
|
||||||
InetAddress.getLocalHost().getHostAddress(),
|
|
||||||
env.getProperty("server.port"),
|
|
||||||
env.getProperty("sxpcwlkj.docUrl"));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -38,6 +38,7 @@ spring:
|
|||||||
primary: master
|
primary: master
|
||||||
# 严格模式 匹配不到数据源则报错
|
# 严格模式 匹配不到数据源则报错
|
||||||
strict: true
|
strict: true
|
||||||
|
public-key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALORmsT62knWOVzHfMuL0zKr3fa+6X2IshTc2C7K9wgR/ywtm/UyNIhlfSeUBYKO+3Y0kMTNHuTLp/pF+0YCtpcCAwEAAQ==
|
||||||
datasource:
|
datasource:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
@ -45,7 +46,7 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||||
username: mms
|
username: mms
|
||||||
password: ZKKxz8KGmpGfLGf3
|
password: ENC(c6FYwkk1dtKxfAcOED4g4mAgzCoK6XTr6+VTXVfQYly9I02yiND8aK5vTeYJ+oJCGH4beQyZLl9H2kt1ZCXqJg==)
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
lazy: true
|
lazy: true
|
||||||
@ -53,7 +54,7 @@ spring:
|
|||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
url: jdbc:mysql://localhost:3306/mms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true
|
||||||
username: mms
|
username: mms
|
||||||
password: ZKKxz8KGmpGfLGf3
|
password: ENC(c6FYwkk1dtKxfAcOED4g4mAgzCoK6XTr6+VTXVfQYly9I02yiND8aK5vTeYJ+oJCGH4beQyZLl9H2kt1ZCXqJg==)
|
||||||
# oracle:
|
# oracle:
|
||||||
# type: ${spring.datasource.type}
|
# type: ${spring.datasource.type}
|
||||||
# driverClassName: oracle.jdbc.OracleDriver
|
# driverClassName: oracle.jdbc.OracleDriver
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user