SpringUtils

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBean

func CopyBean(src interface{}, dest interface{}) error

使用反射直接赋值的方式拷贝,不支持匿名字段,不支持类型转换。 TODO 完善该方法,可以参考 json 序列化,需要进行性能测试。

func CopyBeanUseJson

func CopyBeanUseJson(src interface{}, dest interface{}) error

使用 json 序列化框架进行拷贝,支持匿名字段,支持类型转换。

func LoadXmlConfig

func LoadXmlConfig(path string, config interface{}) error

加载 XML 配置文件

func LocalIPv4

func LocalIPv4() string

获取本机的 IPv4 地址

func String

func String(err error) string

获取 error 的字符串

func ToJson

func ToJson(i interface{}) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL