项目初始
This commit is contained in:
24
src/main/java/com/yxt/yyth/YxtYythApplication.java
Normal file
24
src/main/java/com/yxt/yyth/YxtYythApplication.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.yxt.yyth;
|
||||
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
/**
|
||||
* @author dimengzhe
|
||||
*/
|
||||
@SpringBootApplication(scanBasePackages = {
|
||||
"com.yxt.common.base.config",
|
||||
"com.yxt.yyth"
|
||||
})
|
||||
// 启用自带定时任务
|
||||
@EnableScheduling
|
||||
@EnableFeignClients(basePackages = {})
|
||||
public class YxtYythApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(YxtYythApplication.class, args);
|
||||
}
|
||||
}
|
||||
4
src/main/java/com/yxt/yyth/api/package-info.java
Normal file
4
src/main/java/com/yxt/yyth/api/package-info.java
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明
|
||||
*/
|
||||
package com.yxt.yyth.api;
|
||||
4
src/main/java/com/yxt/yyth/biz/package-info.java
Normal file
4
src/main/java/com/yxt/yyth/biz/package-info.java
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口
|
||||
*/
|
||||
package com.yxt.yyth.biz;
|
||||
4
src/main/java/com/yxt/yyth/config/package-info.java
Normal file
4
src/main/java/com/yxt/yyth/config/package-info.java
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明
|
||||
*/
|
||||
package com.yxt.yyth.config;
|
||||
4
src/main/java/com/yxt/yyth/feign/package-info.java
Normal file
4
src/main/java/com/yxt/yyth/feign/package-info.java
Normal file
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 宇信通监管项目-光伏(山海新能源)项目后台逻辑和接口-接口声明
|
||||
*/
|
||||
package com.yxt.yyth.feign;
|
||||
33
src/main/resources/application-devv.yml
Normal file
33
src/main/resources/application-devv.yml
Normal file
@@ -0,0 +1,33 @@
|
||||
spring:
|
||||
datasource:
|
||||
hikari:
|
||||
max-lifetime: 500000
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://39.104.100.138:3306/yxt_lpk_yyth?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true
|
||||
username: root
|
||||
password: yxt_mysql_138
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 39.104.100.138:8848
|
||||
redis:
|
||||
database: 3 # Redis数据库索引(默认为0)
|
||||
host: 39.104.100.138
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password:
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
|
||||
image:
|
||||
upload:
|
||||
path: D:\supervise\upload\
|
||||
url:
|
||||
prefix: http://127.0.0.1:8112/upload/
|
||||
import:
|
||||
filePath: d:/yxt-supervise-gf/upload/
|
||||
|
||||
29
src/main/resources/application-pro.yml
Normal file
29
src/main/resources/application-pro.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://127.0.0.1:3306/yxt_lpk_yyth?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: 1LAiGz$t1*Iw
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: 127.0.0.1:8848
|
||||
redis:
|
||||
database: 3 # Redis数据库索引(默认为0)
|
||||
host: 127.0.0.1
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password: 123456
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
image:
|
||||
upload:
|
||||
path: D:/supervise/upload/
|
||||
url:
|
||||
prefix: http://127.0.0.1/api/upload/
|
||||
import:
|
||||
filePath: D:/yxt-supervise-gf/upload/
|
||||
34
src/main/resources/application-test.yml
Normal file
34
src/main/resources/application-test.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
server:
|
||||
port: 17201
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://172.18.0.4:3306/yxt_lpk_yyth?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
username: root
|
||||
password: yxt_mysql_138
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
namespace: lipinka
|
||||
server-addr: 172.18.0.5:8848
|
||||
ip: 39.104.100.138
|
||||
redis:
|
||||
database: 3 # Redis数据库索引(默认为0)
|
||||
host: 172.18.0.7
|
||||
jedis:
|
||||
pool:
|
||||
max-active: -1 #连接池最大连接数(使用负值表示没有限制)
|
||||
max-idle: 8 #连接池中的最大空闲连接
|
||||
max-wait: -1 # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
min-idle: 0 # 连接池中的最小空闲连接
|
||||
password:
|
||||
port: 6379
|
||||
timeout: 0 # 连接超时时间(毫秒)
|
||||
|
||||
|
||||
image:
|
||||
upload:
|
||||
path: /home/lzh/docker_data/nginx/html/lpk/yyth-ui/upload/
|
||||
url:
|
||||
prefix: http://jg.yyundong.com/upload/
|
||||
50
src/main/resources/application.yml
Normal file
50
src/main/resources/application.yml
Normal file
@@ -0,0 +1,50 @@
|
||||
spring:
|
||||
application:
|
||||
name: yxt-lpk-yyth
|
||||
profiles:
|
||||
active: devv
|
||||
# active: test
|
||||
# active: pro
|
||||
messages:
|
||||
# 国际化资源文件路径
|
||||
basename: i18n/messages
|
||||
servlet:
|
||||
#上传文件
|
||||
multipart:
|
||||
max-file-size: 50MB
|
||||
max-request-size: 100MB
|
||||
devtools:
|
||||
restart:
|
||||
# 热部署开关
|
||||
enabled: true
|
||||
|
||||
server:
|
||||
port: 7201
|
||||
max-http-header-size: 102400
|
||||
undertow:
|
||||
max-http-post-size: -1
|
||||
|
||||
#mybatis
|
||||
mybatis-plus:
|
||||
# 配置mapper的扫描,找到所有的mapper.xml映射文件
|
||||
mapper-locations: classpath*:**Mapper.xml
|
||||
global-config:
|
||||
refresh: true
|
||||
db-config:
|
||||
#定义生成ID的类型
|
||||
id-type: Auto
|
||||
db-type: mysql
|
||||
configuration:
|
||||
map-underscore-to-camel-case: false
|
||||
cache-enabled: true
|
||||
call-setters-on-nulls: true
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
|
||||
#rocketmq:
|
||||
# producer:
|
||||
# group: yxt-supervise-gf
|
||||
# name-server: 127.0.0.1:9876
|
||||
|
||||
|
||||
|
||||
|
||||
50
src/main/resources/logback-spring.xml
Normal file
50
src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<property name="log.base" value="logs/yxt_yyth" />
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 :
|
||||
|%blue(%thread) 线程 如 :DiscoveryClient-CacheRefreshExecutor-0-->
|
||||
<!--<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>-->
|
||||
<pattern>%yellow(%date{yyyy-MM-dd HH:mm:ss}) |%highlight(%-5level) |%green(%logger:%line) |%blue(%msg%n)
|
||||
</pattern>
|
||||
<!--<charset>UTF-8</charset> -->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 彩色日志 -->
|
||||
<!-- 彩色日志依赖的渲染类 -->
|
||||
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
|
||||
<!-- 彩色日志格式 -->
|
||||
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
|
||||
|
||||
<appender name="FILEOUT"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${log.base}.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${log.base}.%d{yyyyMMdd}.%i.log.zip
|
||||
</fileNamePattern>
|
||||
<!-- 当文件大小超过10MB时触发滚动 -->
|
||||
<timeBasedFileNamingAndTriggeringPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>1MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<!--<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>-->
|
||||
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36}
|
||||
-%msg%n</Pattern>
|
||||
<!--<charset>UTF-8</charset> -->
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILEOUT" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user