Skip to content

Commit

Permalink
feat: create new branch 0.0.2
Browse files Browse the repository at this point in the history
create new branch 0.0.2
  • Loading branch information
jackieonway committed Apr 30, 2020
1 parent 87ba538 commit ecfefbd
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 36 deletions.
7 changes: 7 additions & 0 deletions bin/package-install.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

echo project is packaging and installing ....
cd ..
mvn clean package install -Dmeven.test.skip=true
echo project is installed
cd ./bin
7 changes: 7 additions & 0 deletions bin/package-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo 'project is packaging and installing ....'
cd ..
mvn clean package install -Dmeven.test.skip=true
echo 'project is installed'
cd ./bin
7 changes: 7 additions & 0 deletions bin/release.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off

echo project is releasing ....
cd ..
mvn clean package deploy -Dmeven.test.skip=true
echo project is released
cd ./bin
7 changes: 7 additions & 0 deletions bin/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

echo 'project is releasing ....'
cd ..
mvn clean package deploy -Dmeven.test.skip=true
echo 'project is released'
cd ./bin
10 changes: 10 additions & 0 deletions bin/updateVersion.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
set /P version=<updateVersion.txt
echo Update sms spring boot starter project version to %version%
cd ..
mvn versions:set -DnewVersion=%version%
echo Update sms spring boot starter version to %version% success
echo Update sms spring boot starter child modules version to %version%
mvn versions:update-child-modules
echo Update sms spring boot starter child modules version to %version% success
cd ./bin
9 changes: 9 additions & 0 deletions bin/updateVersion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
version = $(cat updateVersion.txt)
echo 'Update sms spring boot starter project version to $version'
cd ..
mvn versions:set -DnewVersion=$version
echo 'Update sms spring boot starter version to $version success'
echo 'Update sms spring boot starter child modules version to $version'
mvn versions:update-child-modules
echo 'Update sms spring boot starter child modules version to $version success'
1 change: 1 addition & 0 deletions bin/updateVersion.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.2-SNAPSHOT
31 changes: 18 additions & 13 deletions demo-sms/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,29 @@
<dependency>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-starter</artifactId>
<version>0.0.1</version>
<!--<exclusions>
<exclusion>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
</exclusion>
&lt;!&ndash; <exclusion>
<groupId>com.github.qcloudsms</groupId>
<artifactId>qcloudsms</artifactId>
</exclusion>&ndash;&gt;
</exclusions>-->
<version>0.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<!-- 腾讯短信依赖 -->
<!--<dependency>
<groupId>com.github.qcloudsms</groupId>
<artifactId>qcloudsms</artifactId>
<version>1.0.6</version>
<optional>true</optional>
</dependency>-->

<!-- 阿里短信依赖 -->
<!--<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.4.1</version>
</dependency>-->

<!-- 云之讯短信依赖 -->
<dependency>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>ucpass-client</artifactId>
<version>0.0.2-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,21 @@
* @className HelloController
* @description TODO
* @date 2018/11/8 10:17
* @since 0.0.2
**/
@RestController
public class HelloController {

/**
* 1. 可以采用排除相关依赖的方式注入Service
* 2. 可以采用加 @Qualifier("tencentSmsService")的方式注入Service ,
* value的可选值目前只有 tencentSmsService 和aliSmsService两种,
* 3. 可以采用
* @Autowired
* private SmsService tencentSmsService;
* 注入,方式与方法2类似
* 采用方式1,最终的jar包将会比方式2和方法3小,但是最终只有一种短信模式
* 生效,即只能使用一个短信运营商的服务,方式2,3能快速切换短信运营商
* 相对于 0.0.1 版本的短信服务,从 0.0.2 开始,依赖取消了版本的强依赖性,
* 这样就需要在使用的时候显示引入相关依赖
* 使用注入 SmsService 时,直接注入极客
* 现在支持 阿里、腾讯、云之讯短信服务
*/

@Autowired
private SmsService smsService;

// @Autowired
// private SmsService aliSmsService;

@GetMapping("/tencent")
public Object tencent() {
// 具体配置请参照具体运营商
Expand All @@ -54,6 +47,6 @@ public Object ali() {
aliSmsRequest.setPhoneNumbers(new String[]{"your cellphone"});
aliSmsRequest.setTemplateParam("{\"code\":\"asdsads\"}");
aliSmsRequest.setSignName("123");
return aliSmsService.sendTemplateSms("328921",aliSmsRequest);
return smsService.sendTemplateSms("328921",aliSmsRequest);
}*/
}
10 changes: 9 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-parent</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<name>sms-spring-boot-parent</name>
<packaging>pom</packaging>
<properties>
Expand Down Expand Up @@ -57,6 +57,14 @@
</developers>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
Expand Down
6 changes: 3 additions & 3 deletions sms-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-parent</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>sms-spring-boot-autoconfigure</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<name>sms-spring-boot-autoconfigure</name>
<packaging>jar</packaging>

Expand Down Expand Up @@ -50,7 +50,7 @@
<dependency>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>ucpass-client</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<optional>true</optional>
</dependency>
</dependencies>
Expand Down
6 changes: 3 additions & 3 deletions sms-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-parent</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>sms-spring-boot-starter</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<name>sms-spring-boot-starter</name>
<packaging>jar</packaging>

Expand All @@ -21,7 +21,7 @@
<dependency>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-autoconfigure</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
5 changes: 2 additions & 3 deletions ucpass-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
<parent>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>sms-spring-boot-parent</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>com.github.jackieonway.sms</groupId>
<artifactId>ucpass-client</artifactId>
<version>0.0.1</version>
<version>0.0.2-SNAPSHOT</version>
<name>ucpass-client</name>
<packaging>jar</packaging>
<description>Ucpass project for Spring Boot</description>
Expand Down

0 comments on commit ecfefbd

Please sign in to comment.