parent
80e0567257
commit
2849acaf54
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,45 @@ |
||||
<?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"> |
||||
<parent> |
||||
<groupId>com.hai</groupId> |
||||
<artifactId>hai-parent</artifactId> |
||||
<version>1.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<groupId>com.hgj</groupId> |
||||
<artifactId>hai-msg</artifactId> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>com.hai</groupId> |
||||
<artifactId>hai-service</artifactId> |
||||
<version>PACKT-SNAPSHOT</version> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<resources> |
||||
<resource> |
||||
<directory>src/main/resources/${env}</directory> |
||||
<filtering>false</filtering> |
||||
</resource> |
||||
</resources> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.apache.maven.plugins</groupId> |
||||
<artifactId>maven-surefire-plugin</artifactId> |
||||
<configuration> |
||||
<skip>true</skip> |
||||
</configuration> |
||||
</plugin> |
||||
<plugin> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
|
||||
</project> |
@ -0,0 +1,28 @@ |
||||
package com; |
||||
|
||||
import com.hai.common.utils.SpringContextUtil; |
||||
import org.mybatis.spring.annotation.MapperScan; |
||||
import org.springframework.boot.SpringApplication; |
||||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
import org.springframework.boot.web.servlet.ServletComponentScan; |
||||
import org.springframework.context.ApplicationContext; |
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy; |
||||
import org.springframework.scheduling.annotation.EnableScheduling; |
||||
import org.springframework.transaction.annotation.EnableTransactionManagement; |
||||
|
||||
@SpringBootApplication |
||||
// @ComponentScan
|
||||
@EnableTransactionManagement |
||||
@EnableScheduling |
||||
@ServletComponentScan |
||||
@EnableAspectJAutoProxy(proxyTargetClass = true) |
||||
@MapperScan("com.hai.dao") |
||||
public class MsgApplication |
||||
{ |
||||
public static void main( String[] args ) |
||||
{ |
||||
ApplicationContext app = SpringApplication.run(MsgApplication.class, args); |
||||
SpringContextUtil.setApplicationContext(app); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,45 @@ |
||||
package com.msg.controller; |
||||
|
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.service.WebSocket; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestMethod; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.ResponseBody; |
||||
|
||||
@Controller |
||||
@RequestMapping(value = "/test") |
||||
@Api(value = "订单接口") |
||||
public class HighMegController { |
||||
|
||||
@Autowired |
||||
private WebSocket webSocket; |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighMegController.class); |
||||
|
||||
@RequestMapping(value = "/websocket", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "websocket") |
||||
public ResponseData websocket( |
||||
@RequestParam(name = "userId", required = true) String userId, |
||||
@RequestParam(name = "message", required = true) String message |
||||
) { |
||||
try { |
||||
|
||||
webSocket.SenderMessage(userId ,message); |
||||
return ResponseMsgUtil.success("成功"); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighOrderController --> unionStagingPay() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,56 @@ |
||||
server: |
||||
port: 9901 |
||||
servlet: |
||||
context-path: /msg |
||||
|
||||
#配置是否为debug模式,debug模式下,不开启权限校验 |
||||
debug: false |
||||
|
||||
#datasource数据源设置 |
||||
spring: |
||||
datasource: |
||||
url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false |
||||
username: root |
||||
password: HF123456. |
||||
type: com.alibaba.druid.pool.DruidDataSource |
||||
driver-class-name: com.mysql.jdbc.Driver |
||||
filters: stat |
||||
maxActive: 10 |
||||
initialSize: 5 |
||||
maxWait: 60000 |
||||
minIdle: 5 |
||||
timeBetweenEvictionRunsMillis: 60000 |
||||
minEvictableIdleTimeMillis: 300000 |
||||
validationQuery: select 'x' |
||||
testWhileIdle: true |
||||
testOnBorrow: false |
||||
testOnReturn: false |
||||
poolPreparedStatements: true |
||||
maxOpenPreparedStatements: 20 |
||||
redis: |
||||
database: 0 |
||||
host: 139.159.177.244 |
||||
port: 36379 |
||||
password: HF123456.Redis |
||||
timeout: 36000000 |
||||
jedis: |
||||
pool: |
||||
max-active: 20 |
||||
max-wait: -1 |
||||
max-idle: 10 |
||||
min-idle: 0 |
||||
#配置日期返回至前台为时间戳 |
||||
jackson: |
||||
serialization: |
||||
write-dates-as-timestamps: true |
||||
mybatis: |
||||
mapperLocations: |
||||
- classpath*:sqlmap*/*.xml |
||||
type-aliases-package: |
||||
org.springboot.sample.entity |
||||
|
||||
pagehelper: |
||||
helperDialect: mysql |
||||
reasonable: true |
||||
supportMethodsArguments: true |
||||
params: count=countSql |
@ -0,0 +1,4 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
agentQrCode=/home/project/hsg/filesystem/agentQrCode |
||||
agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=ic&id= |
@ -0,0 +1,72 @@ |
||||
<configuration> |
||||
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, --> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern>%d %p (%file:%line\)- %m%n</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="baselog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/base.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/base.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="daolog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/dao.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/dao.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="errorlog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/error.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/error.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<root level="DEBUG"> |
||||
<appender-ref ref="STDOUT" /> |
||||
</root> |
||||
<logger name="com.hai" level="DEBUG"> |
||||
<appender-ref ref="baselog" /> |
||||
</logger> |
||||
<logger name="com.hai.dao" level="DEBUG"> |
||||
<appender-ref ref="daolog" /> |
||||
</logger> |
||||
<logger name="com.hai" level="ERROR"> |
||||
<appender-ref ref="errorlog" /> |
||||
</logger> |
||||
</configuration> |
@ -0,0 +1,56 @@ |
||||
server: |
||||
port: 9901 |
||||
servlet: |
||||
context-path: /msg |
||||
|
||||
#配置是否为debug模式,debug模式下,不开启权限校验 |
||||
debug: false |
||||
|
||||
#datasource数据源设置 |
||||
spring: |
||||
datasource: |
||||
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false |
||||
username: root |
||||
password: HF123456. |
||||
type: com.alibaba.druid.pool.DruidDataSource |
||||
driver-class-name: com.mysql.jdbc.Driver |
||||
filters: stat |
||||
maxActive: 10 |
||||
initialSize: 5 |
||||
maxWait: 60000 |
||||
minIdle: 5 |
||||
timeBetweenEvictionRunsMillis: 60000 |
||||
minEvictableIdleTimeMillis: 300000 |
||||
validationQuery: select 'x' |
||||
testWhileIdle: true |
||||
testOnBorrow: false |
||||
testOnReturn: false |
||||
poolPreparedStatements: true |
||||
maxOpenPreparedStatements: 20 |
||||
redis: |
||||
database: 1 |
||||
host: 139.159.177.244 |
||||
port: 36379 |
||||
password: HF123456.Redis |
||||
timeout: 1000 |
||||
jedis: |
||||
pool: |
||||
max-active: 20 |
||||
max-wait: -1 |
||||
max-idle: 10 |
||||
min-idle: 0 |
||||
#配置日期返回至前台为时间戳 |
||||
jackson: |
||||
serialization: |
||||
write-dates-as-timestamps: true |
||||
mybatis: |
||||
mapperLocations: |
||||
- classpath*:sqlmap*/*.xml |
||||
type-aliases-package: |
||||
org.springboot.sample.entity |
||||
|
||||
pagehelper: |
||||
helperDialect: mysql |
||||
reasonable: true |
||||
supportMethodsArguments: true |
||||
params: count=countSql |
@ -0,0 +1,4 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
agentQrCode=/home/project/hsg/filesystem/agentQrCode |
||||
agentQrCodeWxUrl=https://hsgcs.dctpay.com/wx/?action=gogogo&id= |
@ -0,0 +1,72 @@ |
||||
<configuration> |
||||
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, --> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern>%d %p (%file:%line\)- %m%n</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="baselog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/base.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/base.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="daolog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/dao.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/dao.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="errorlog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/error.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/error.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<root level="DEBUG"> |
||||
<appender-ref ref="STDOUT" /> |
||||
</root> |
||||
<logger name="com.hai" level="DEBUG"> |
||||
<appender-ref ref="baselog" /> |
||||
</logger> |
||||
<logger name="com.hai.dao" level="DEBUG"> |
||||
<appender-ref ref="daolog" /> |
||||
</logger> |
||||
<logger name="com.hai" level="ERROR"> |
||||
<appender-ref ref="errorlog" /> |
||||
</logger> |
||||
</configuration> |
@ -0,0 +1,74 @@ |
||||
server: |
||||
port: 9901 |
||||
servlet: |
||||
context-path: /msg |
||||
|
||||
#配置是否为debug模式,debug模式下,不开启权限校验 |
||||
debug: false |
||||
|
||||
#datasource数据源设置 |
||||
spring: |
||||
datasource: |
||||
url: jdbc:mysql://192.168.0.63:21100/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8 |
||||
username: hsg |
||||
password: HUfukeji123456!@# |
||||
type: com.alibaba.druid.pool.DruidDataSource |
||||
driver-class-name: com.mysql.jdbc.Driver |
||||
filters: stat |
||||
maxActive: 10 |
||||
initialSize: 5 |
||||
maxWait: 60000 |
||||
minIdle: 5 |
||||
timeBetweenEvictionRunsMillis: 60000 |
||||
minEvictableIdleTimeMillis: 300000 |
||||
validationQuery: select 'x' |
||||
testWhileIdle: true |
||||
testOnBorrow: false |
||||
testOnReturn: false |
||||
poolPreparedStatements: true |
||||
maxOpenPreparedStatements: 20 |
||||
redis: |
||||
database: 0 |
||||
host: 127.0.0.1 |
||||
port: 36379 |
||||
password: HF123456.Redis |
||||
timeout: 1000 |
||||
jedis: |
||||
pool: |
||||
max-active: 20 |
||||
max-wait: -1 |
||||
max-idle: 10 |
||||
min-idle: 0 |
||||
#thymelea模板配置 |
||||
thymeleaf: |
||||
prefix: classpath:/templates/ |
||||
suffix: .html |
||||
mode: HTML5 |
||||
encoding: UTF-8 |
||||
#热部署文件,页面不产生缓存,及时更新 |
||||
cache: false |
||||
#配置日期返回至前台为时间戳 |
||||
jackson: |
||||
serialization: |
||||
write-dates-as-timestamps: true |
||||
|
||||
|
||||
thymeleaf: |
||||
cache: false |
||||
prefix: classpath:/templates/ |
||||
suffix: .html |
||||
encoding: UTF-8 |
||||
content-type: text/html |
||||
mode: HTML5 |
||||
|
||||
mybatis: |
||||
mapperLocations: |
||||
- classpath*:sqlmap*/*.xml |
||||
type-aliases-package: |
||||
org.springboot.sample.entity |
||||
|
||||
pagehelper: |
||||
helperDialect: mysql |
||||
reasonable: true |
||||
supportMethodsArguments: true |
||||
params: count=countSql |
@ -0,0 +1,4 @@ |
||||
fileUrl=/home/project/hsg/filesystem |
||||
cmsPath=/home/project/hsg/filesystem/cmsPath |
||||
agentQrCode=/home/project/hsg/filesystem/agentQrCode |
||||
agentQrCodeWxUrl=https://hsg.dctpay.com/wx/?action=ic&id= |
@ -0,0 +1,72 @@ |
||||
<configuration> |
||||
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, --> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern>%d %p (%file:%line\)- %m%n</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="baselog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/base.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/base.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="daolog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/dao.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/dao.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<appender name="errorlog" |
||||
class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<File>log/error.log</File> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
<fileNamePattern>log/error.log.%d.%i</fileNamePattern> |
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
<!-- or whenever the file size reaches 64 MB --> |
||||
<maxFileSize>64 MB</maxFileSize> |
||||
</timeBasedFileNamingAndTriggeringPolicy> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
%d %p (%file:%line\)- %m%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
</encoder> |
||||
</appender> |
||||
<root level="DEBUG"> |
||||
<appender-ref ref="STDOUT" /> |
||||
</root> |
||||
<logger name="com.hai" level="DEBUG"> |
||||
<appender-ref ref="baselog" /> |
||||
</logger> |
||||
<logger name="com.hai.dao" level="DEBUG"> |
||||
<appender-ref ref="daolog" /> |
||||
</logger> |
||||
<logger name="com.hai" level="ERROR"> |
||||
<appender-ref ref="errorlog" /> |
||||
</logger> |
||||
</configuration> |
Loading…
Reference in new issue