1 Star 2 Fork 3

kristas/booting-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
auth_datasource_config.go 739 Bytes
一键复制 编辑 原始数据 按行查看 历史
kristas 提交于 2021-09-29 17:29 . feat: refactor web
package config
import (
"gitee.com/kristas/booting-go/framework"
"gitee.com/kristas/booting-go/framework/core/bean"
"gitee.com/kristas/booting-go/framework/data/datasource"
"reflect"
)
func init() {
framework.Component(new(AuthDatasourceConfiguration))
}
type AuthDatasourceConfiguration struct {
bean.Component
}
func (d *AuthDatasourceConfiguration) GetBean() (bean.Bean, error) {
return datasource.NewHelper().
SetPropertiesPrefix("application.datasource").
SetDatasourceTag("auth_datasource").
CreateDatasource()
}
func (d *AuthDatasourceConfiguration) GetBeanType() reflect.Type {
return reflect.TypeOf(new(datasource.Datasource)).Elem()
}
func (d *AuthDatasourceConfiguration) IsSingleton() bool {
return true
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/kristas/booting-go.git
git@gitee.com:kristas/booting-go.git
kristas
booting-go
booting-go
v1.4.1

搜索帮助