oying-common/src/main/java/com/oying/config/webConfig/WebSocketConfig.java
@@ -1,18 +1,18 @@ package com.oying.config.webConfig; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.socket.server.standard.ServerEndpointExporter; /** * @author Z * @date 2019-08-24 15:44 */ @Configuration public class WebSocketConfig { @Bean public ServerEndpointExporter serverEndpointExporter() { return new ServerEndpointExporter(); } } //package com.oying.config.webConfig; // //import org.springframework.context.annotation.Bean; //import org.springframework.context.annotation.Configuration; //import org.springframework.web.socket.server.standard.ServerEndpointExporter; // ///** 打war包注释 // * @author Z // * @date 2019-08-24 15:44 // */ //@Configuration //public class WebSocketConfig { // // @Bean // public ServerEndpointExporter serverEndpointExporter() { // return new ServerEndpointExporter(); // } //} oying-system/pom.xml
@@ -8,6 +8,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>oying-system</artifactId> <packaging>war</packaging> <name>核心模块</name> <properties> oying-system/src/main/java/com/oying/AppRun.java
@@ -7,7 +7,9 @@ import com.oying.utils.SpringBeanHolder; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.ApplicationPidFileWriter; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.context.annotation.Bean; import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.web.bind.annotation.RestController; @@ -21,7 +23,7 @@ @Api(hidden = true) @SpringBootApplication @EnableTransactionManagement public class AppRun { public class AppRun extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(AppRun.class); @@ -35,6 +37,16 @@ log.info("---------------------------------------------"); } /** * 打war包配置 * */ @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { // 注意这里要指向原先用main方法执行的Application启动类 return builder.sources(AppRun.class); } @Bean public SpringBeanHolder springContextHolder() { return new SpringBeanHolder(); oying-system/src/main/resources/config/application-dev.yml
@@ -154,16 +154,12 @@ swift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093 # 签名方式 sign-type: MD5 # 原生JS @@ -173,11 +169,13 @@ # 请求url req-url: https://pay.hstypay.com/v2/pay/gateway # 支付通知地址 notify-url: http://1.95.124.88:8088/api/swiftPass/alipayCallback notify-url: http://api.o-ying.cn:8088/oying/api/swiftPass/alipayCallback # 退款通知地址 refund-url: http://1.95.124.88:8088/api/swiftPass/returnNotify refund-url: http://api.o-ying.cn:8088/oying/api/swiftPass/returnNotify obs: # 测试环境 enabled: true access_key_id: RZ1UIOZDZ58DD4NWPD6Q access_key_secret: QpE58YEFtgoIwUoGNlN5JlNY7t6qVu7vMkix8gAI bucket: oying oying-system/src/main/resources/config/application-prod.yml
@@ -4,9 +4,9 @@ druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:oying}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false username: ${DB_USER:root} password: ${DB_PWD:123456} url: jdbc:mysql://${DB_HOST:192.168.0.5}:${DB_PORT:3306}/${DB_NAME:oying}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false username: ${DB_USER:oydbroot} password: ${DB_PWD:Ly123456@(^)9} # 初始连接数,建议设置为与最小空闲连接数相同 initial-size: 20 # 最小空闲连接数,保持足够的空闲连接以应对请求 @@ -164,7 +164,7 @@ # 汇旺财 swift-pass: # 密钥 key: vJB6683s4NtQtXBgHTvE1hWOUtcre7nj key: s7Jf1eEM5QlxihWSxZh673pDhGY7p0s0 # 密钥2 key-2: s7Jf1eEM5QlxihWSxZh673pDhGY7p0s0 # 私钥 @@ -172,7 +172,7 @@ # 公钥 plat-public-key: MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtmDbhqkgBXCFTnPZp5iG51X0KMsjAaMhqkw923osv1LF2axheDiKzxHr8F58B5LVEbqYxwCr7fdjy+C/cE8+3JJ2kJBdDR+bGjnWN7C/PMR+xd6koCMBz75EYpXhXhB8fqSp1wZrPMopYg6j5NDFd4kUaFyoUZ6I61gGCYcs/tYidd6llwlnKa/YX++1Lv69Te8LCSjeGe+TNqkAui4EU2h6Aa6CxlbZXeDzN9HnuqPUUfMohVceBQ1bpIpxkdeZ07KzYfrFMd6YlV6mK6tt1D41FlbSZX/XBL3zVVwjLGu9SxhM1JdM8Q33sl0UIXpdxNu6dqKLxGL4ZebPqWYbVwIDAQAB # 门店编号 mch-id: 1030238092 mch-id: 1030238093 # 门店编号2 mch-id-2: 1030238093 # 签名方式 @@ -184,11 +184,13 @@ # 请求url req-url: https://pay.hstypay.com/v2/pay/gateway # 支付通知地址 notify-url: http://1.95.124.88:8088/api/swiftPass/alipayCallback notify-url: https://o-ying.cn/oying/api/swiftPass/alipayCallback # 退款通知地址 refund-url: http://1.95.124.88:8088/api/swiftPass/returnNotify refund-url: https://o-ying.cn/oying/api/swiftPass/returnNotify obs: # 测试环境 enabled: false access_key_id: RZ1UIOZDZ58DD4NWPD6Q access_key_secret: QpE58YEFtgoIwUoGNlN5JlNY7t6qVu7vMkix8gAI bucket: oying oying-tools/src/main/java/com/oying/service/impl/BucketStorageServiceImpl.java
@@ -58,6 +58,9 @@ String type = FileUtil.getFileType(suffix); String reaName = System.currentTimeMillis() + "." + suffix; String objectKey = type + "/" + reaName; if (properties.getEnabled()) { objectKey = "test/" +objectKey; } PutObjectResult result = ObsUtils.putObject(properties, file, objectKey, AccessControlList.REST_CANNED_PUBLIC_READ); if (ObjectUtil.isNull(result)) { throw new BadRequestException("上传失败"); @@ -83,6 +86,9 @@ String type = FileUtil.getFileType(suffix); String reaName = IdUtil.getSnowflake(1, 1).nextId() + "." + suffix; String objectKey = type + "/" + reaName; if (properties.getEnabled()) { objectKey = "test/" +objectKey; } PutObjectResult result = ObsUtils.putObject(properties, FileUtil.toFile(file), objectKey, AccessControlList.REST_CANNED_PUBLIC_READ); if (ObjectUtil.isNull(result)) { throw new BadRequestException("上传失败"); oying-tools/src/main/java/com/oying/utils/ObsProperties.java
@@ -18,4 +18,5 @@ private String accessKeySecret; private String bucket; private String endpoint; private Boolean enabled; }