mirror of
https://gitee.com/mmsAdmin/mms
synced 2025-12-06 08:58:55 +08:00
Compare commits
3 Commits
d183cbf39a
...
9e5503c0e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9e5503c0e8 | ||
|
|
5518c2d368 | ||
|
|
2dd5f5e9d2 |
@ -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
|
||||
# 严格模式 匹配不到数据源则报错
|
||||
strict: true
|
||||
public-key: MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBALORmsT62knWOVzHfMuL0zKr3fa+6X2IshTc2C7K9wgR/ywtm/UyNIhlfSeUBYKO+3Y0kMTNHuTLp/pF+0YCtpcCAwEAAQ==
|
||||
datasource:
|
||||
# 主库数据源
|
||||
master:
|
||||
@ -45,7 +46,7 @@ spring:
|
||||
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
|
||||
username: mms
|
||||
password: ZKKxz8KGmpGfLGf3
|
||||
password: ENC(c6FYwkk1dtKxfAcOED4g4mAgzCoK6XTr6+VTXVfQYly9I02yiND8aK5vTeYJ+oJCGH4beQyZLl9H2kt1ZCXqJg==)
|
||||
# 从库数据源
|
||||
slave:
|
||||
lazy: true
|
||||
@ -53,7 +54,7 @@ spring:
|
||||
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
|
||||
username: mms
|
||||
password: ZKKxz8KGmpGfLGf3
|
||||
password: ENC(c6FYwkk1dtKxfAcOED4g4mAgzCoK6XTr6+VTXVfQYly9I02yiND8aK5vTeYJ+oJCGH4beQyZLl9H2kt1ZCXqJg==)
|
||||
# oracle:
|
||||
# type: ${spring.datasource.type}
|
||||
# driverClassName: oracle.jdbc.OracleDriver
|
||||
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user