
13 changed files with 426 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
|
||||
|
<artifactId>supervise-message</artifactId> |
||||
|
<groupId>com.yxt.supervise</groupId> |
||||
|
<version>0.0.1</version> |
||||
|
<packaging>pom</packaging> |
||||
|
|
||||
|
<modules> |
||||
|
<module>supervise-message-biz</module> |
||||
|
</modules> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,95 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
<parent> |
||||
|
<groupId>com.yxt</groupId> |
||||
|
<artifactId>yxt-parent</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
<relativePath/> |
||||
|
</parent> |
||||
|
|
||||
|
<groupId>com.yxt.supervise</groupId> |
||||
|
<artifactId>supervise-message-biz</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
|
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>com.yxt</groupId> |
||||
|
<artifactId>yxt-common-base</artifactId> |
||||
|
<version>0.0.1</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
|
||||
|
<!--mysql--> |
||||
|
<dependency> |
||||
|
<groupId>mysql</groupId> |
||||
|
<artifactId>mysql-connector-java</artifactId> |
||||
|
<scope>runtime</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.alibaba.cloud</groupId> |
||||
|
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.cloud</groupId> |
||||
|
<artifactId>spring-cloud-starter-openfeign</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>com.baomidou</groupId> |
||||
|
<artifactId>mybatis-plus-boot-starter</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.baomidou</groupId> |
||||
|
<artifactId>mybatis-plus-annotation</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>junit</groupId> |
||||
|
<artifactId>junit</artifactId> |
||||
|
<scope>compile</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>javax.servlet</groupId> |
||||
|
<artifactId>javax.servlet-api</artifactId> |
||||
|
<version>4.0.1</version> |
||||
|
<scope>compile</scope> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<version>2.7.2</version> |
||||
|
<executions> |
||||
|
<execution> |
||||
|
<goals> |
||||
|
<goal>repackage</goal> |
||||
|
</goals> |
||||
|
</execution> |
||||
|
</executions> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
<resources> |
||||
|
<resource> |
||||
|
<directory>src/main/java</directory> |
||||
|
<includes> |
||||
|
<include>**/*Mapper.xml</include> |
||||
|
</includes> |
||||
|
</resource> |
||||
|
<resource> |
||||
|
<directory>src/main/resources</directory> |
||||
|
<includes> |
||||
|
<include>**/*.yml</include> |
||||
|
</includes> |
||||
|
<filtering>false</filtering> |
||||
|
</resource> |
||||
|
</resources> |
||||
|
</build> |
||||
|
</project> |
@ -0,0 +1,24 @@ |
|||||
|
package com.yxt.supervise.message; |
||||
|
|
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient; |
||||
|
import org.springframework.cloud.openfeign.EnableFeignClients; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/23 |
||||
|
**/ |
||||
|
@EnableDiscoveryClient |
||||
|
@SpringBootApplication(scanBasePackages = { |
||||
|
"com.yxt.common.base.config", |
||||
|
"com.yxt.supervise.message" |
||||
|
}) |
||||
|
@EnableFeignClients(basePackages = {"com.yxt.supervise.message"}) |
||||
|
public class MessageApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(MessageApplication.class, args); |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package com.yxt.supervise.message.api.message; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/24 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class Message { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.supervise.message.biz.message; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.yxt.supervise.message.api.message.Message; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/24 |
||||
|
**/ |
||||
|
@Mapper |
||||
|
public interface MessageMapper extends BaseMapper<Message> { |
||||
|
} |
@ -0,0 +1,4 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.yxt.supervise.message.biz.message.MessageMapper"> |
||||
|
</mapper> |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.supervise.message.biz.message; |
||||
|
|
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/24 |
||||
|
**/ |
||||
|
@RestController |
||||
|
@RequestMapping("v1/Message") |
||||
|
public class MessageRest { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.yxt.supervise.message.biz.message; |
||||
|
|
||||
|
import com.yxt.common.base.service.MybatisBaseService; |
||||
|
import com.yxt.supervise.message.api.message.Message; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: dimengzhe |
||||
|
* @date: 2023/11/24 |
||||
|
**/ |
||||
|
@Service |
||||
|
public class MessageService extends MybatisBaseService<MessageMapper, Message> { |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://39.104.100.138:3306/supervise_message?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
||||
|
username: root |
||||
|
password: yxt_mysql_138 |
||||
|
cloud: |
||||
|
nacos: |
||||
|
discovery: |
||||
|
namespace: supervise |
||||
|
server-addr: 39.104.100.138:8848 |
||||
|
register-enabled: false |
||||
|
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://192.168.0.114:8112/upload/ |
@ -0,0 +1,59 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
dynamic: |
||||
|
primary: master #设置默认的数据源或者数据源组,默认值即为master |
||||
|
strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源 |
||||
|
datasource: |
||||
|
master: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/supervise_report?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true |
||||
|
username: root |
||||
|
password: 1LAiGz$t1*Iw |
||||
|
supplychain: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/supervise_supplychain?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true |
||||
|
username: root |
||||
|
password: 1LAiGz$t1*Iw |
||||
|
warehouse: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/warehouse2?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true |
||||
|
username: root |
||||
|
password: 1LAiGz$t1*Iw |
||||
|
crm: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/supervise_crm?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true |
||||
|
username: root |
||||
|
password: 1LAiGz$t1*Iw |
||||
|
system: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/supervise_auth?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=true |
||||
|
username: root |
||||
|
password: 1LAiGz$t1*Iw |
||||
|
rms: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://127.0.0.1:3306/supervise_rms?serverTimezone=GMT%2B8&autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&nullCatalogMeansCurrent=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:/webapps/supervise/static/upload/ |
||||
|
url: |
||||
|
prefix: https://supervise.yxtsoft.com/downfile/ |
||||
|
|
@ -0,0 +1,33 @@ |
|||||
|
server: |
||||
|
port: 17010 |
||||
|
|
||||
|
spring: |
||||
|
datasource: |
||||
|
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
|
url: jdbc:mysql://172.18.0.4:3306/supervise_message?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true |
||||
|
username: root |
||||
|
password: yxt_mysql_138 |
||||
|
cloud: |
||||
|
nacos: |
||||
|
discovery: |
||||
|
namespace: supervise |
||||
|
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/supervise/supervise-portal-ui/upload/ |
||||
|
url: |
||||
|
prefix: http://jg.yyundong.com/upload/ |
@ -0,0 +1,62 @@ |
|||||
|
spring: |
||||
|
application: |
||||
|
name: supervise-message |
||||
|
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: 7010 |
||||
|
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 |
||||
|
|
||||
|
#hystrix的超时时间 |
||||
|
hystrix: |
||||
|
command: |
||||
|
default: |
||||
|
execution: |
||||
|
timeout: |
||||
|
enabled: true |
||||
|
isolation: |
||||
|
thread: |
||||
|
timeoutInMilliseconds: 60000 |
||||
|
#ribbon的超时时间 |
||||
|
ribbon: |
||||
|
ReadTimeout: 60000 |
||||
|
ConnectTimeout: 60000 |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,50 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<configuration> |
||||
|
|
||||
|
<property name="log.base" value="logs/supervise_message" /> |
||||
|
|
||||
|
<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> |
Loading…
Reference in new issue