| | |
| | | import com.tcm.training.admin.app.auth.dto.AppWechatLoginRequest; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestOperations; |
| | | import org.springframework.web.client.RestTemplate; |
| | |
| | | /** |
| | | * 使用默认 HTTP 客户端构造微信认证客户端。 |
| | | */ |
| | | @Autowired |
| | | public AppWechatAuthClient(AppWechatAuthProperties properties, ObjectMapper objectMapper) { |
| | | this(properties, objectMapper, new RestTemplate()); |
| | | } |
| | | |
| | | /** |
| | | * 注入微信配置、JSON 解析器与 HTTP 客户端。 |
| | | * 存在多个构造器时,这个扩展构造器仅供测试或内部定制使用,避免 Spring 误判默认注入入口。 |
| | | */ |
| | | AppWechatAuthClient(AppWechatAuthProperties properties, |
| | | ObjectMapper objectMapper, |