Commit daa7b758 authored by qinxunjia's avatar qinxunjia

初步测试

parent 9c3719a8
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
\ No newline at end of file
<?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>
<groupId>org.example</groupId>
<artifactId>dmhub-plugin</artifactId>
<version>1.0-SNAPSHOT</version>
<name>插件服务</name>
<description>DM hub集成插件服务</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package com.jz;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
package com.jz.sms.api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("test")
public class BizController {
@RequestMapping("index")
public String index() {
return "success";
}
/**
* 创建短信模板
*
* @return
*/
@RequestMapping("/sms/template")
public String template() {
return "success";
}
/**
* 批量发送(通知或营销类)
* @return
*/
@RequestMapping("/sms/batch")
public String batch() {
return "success";
}
/**
* 发送单条(通知或营销类)
* @return
*/
@RequestMapping("/sms/send")
public String send() {
return "success";
}
}
package com.jz.sms.chuanlan;
import java.util.Map;
public interface SendService {
Map<String, Object> send(Map<String, Object> params);
}
package com.jz.sms.chuanlan.impl;
import com.jz.sms.chuanlan.SendService;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
public class SendServiceImpl implements SendService {
@Override
public Map<String, Object> send(Map<String, Object> params) {
return null;
}
}
package com.hsht.common.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* 系统配置
*
* @author shuliangxing
* @date 2018/6/11 10:47
*/
@Component
public class SMSConfig {
// notificationAccount: N0767543
// notificationPassword: N0767543
//
// marketingAccount: M7603731
// marketingPassword: N0767543
// sendFixed: http://smssh1.253.com/msg/send/json #短信下发接口
// sendVariable: http://smssh1.253.com/msg/variable/json #变量短信下发接口
// reportUrl: http://test.9z.com/msg/report # 短信报告
public static String notificationAccount;
public static String notificationPassword;
public static String marketingAccount;
public static String marketingPassword;
public static String sendFixed;
public static String sendVariable;
public static String reportUrl;
@Value("${system.config.lanchuan.notificationAccount}")
public static void setNotificationAccount(String notificationAccount) {
SMSConfig.notificationAccount = notificationAccount;
}
@Value("${system.config.lanchuan.notificationPassword}")
public static void setNotificationPassword(String notificationPassword) {
SMSConfig.notificationPassword = notificationPassword;
}
@Value("${system.config.lanchuan.marketingAccount}")
public static void setMarketingAccount(String marketingAccount) {
SMSConfig.marketingAccount = marketingAccount;
}
@Value("${system.config.lanchuan.marketingPassword}")
public static void setMarketingPassword(String marketingPassword) {
SMSConfig.marketingPassword = marketingPassword;
}
@Value("${system.config.lanchuan.sendFixed}")
public static void setSendFixed(String sendFixed) {
SMSConfig.sendFixed = sendFixed;
}
@Value("${system.config.lanchuan.sendVariable}")
public static void setSendVariable(String sendVariable) {
SMSConfig.sendVariable = sendVariable;
}
@Value("${system.config.lanchuan.reportUrl}")
public static void setReportUrl(String reportUrl) {
SMSConfig.reportUrl = reportUrl;
}
}
server:
port: 9010
#contextPath: /resource
system:
config:
chuanlan:
notificationAccount: N0767543
notificationPassword: N0767543
marketingAccount: M7603731
marketingPassword: N0767543
sendFixed: http://smssh1.253.com/msg/send/json #短信下发接口
sendVariable: http://smssh1.253.com/msg/variable/json #变量短信下发接口
reportUrl: http://test.9z.com/msg/report # 短信报告
\ No newline at end of file
# 测试环境配置
server:
port: 9010
#contextPath: /resource
system:
config:
chuanlan:
notificationAccount: N0767543
notificationPassword: N0767543
marketingAccount: M7603731
marketingPassword: N0767543
sendFixed: http://smssh1.253.com/msg/send/json #短信下发接口
sendVariable: http://smssh1.253.com/msg/variable/json #变量短信下发接口
reportUrl: http://test.9z.com/msg/report # 短信报告
# 系统信息
info:
app:
name: "@project.name@"
description: "@project.description@"
version: "@project.version@"
spring-boot-version: "@project.parent.version@"
spring:
profiles:
active: test
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment