spring-boot-starter-sms
约 215 字小于 1 分钟
2026-05-09
spring-boot-starter-sms
短信发送组件:对上游暴露统一 ApiSmsSendService(spring-boot-starter-sms-api),具体厂商(创蓝、玄武等)在 -biz 中通过 SPI/实现类切换,换短信平台只需改配置,不必改业务代码。
AI / 开发者:新增或修改本模块
crud/entity前必读仓库根目录 AI 编码规范(实体必须extends BaseEntity,业务主键为smsXxxCode,技术主键为id)。
对外 API
BizSmsService.sendSms(String mobile, String content)等(以接口定义为准)。
Maven 结构
spring-boot-starter-sms-api:配置属性SmsProperties、发送器工具类、常量枚举。spring-boot-starter-sms-biz:BizSmsAutoConfiguration、默认业务实现与各厂商Spi*SmsServiceImpl。
引入 spring-boot-starter-sms-biz 即可获得自动配置与实现;仅契约依赖可单独引入 -api。 源码路径:tg-boot/spring-boot-starter-module/spring-boot-starter-components/
