com.healthy.common.security.social.weixin.config.WeixinConfig Maven / Gradle / Ivy
package com.healthy.common.security.social.weixin.config;
import com.healthy.common.security.social.view.HealthyConnectView;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.View;
/**
* 微信登录配置
*/
@Configuration
@ConditionalOnProperty(prefix = "healthy.security.social.weixin", name = "app-id")
public class WeixinConfig {
/**
* connect/qqConnect格式为: connect/{providerId}Connect
* 配置默认微信绑定/解绑成功的返回页
*
* @return
*/
@Bean({"connect/weixinConnect", "connect/weixinConnected"})
@ConditionalOnMissingBean(name = "weixinConnectedView")
public View weixinConnectedView() {
return new HealthyConnectView();
}
}