@@ -32,24 +32,24 @@ import (
3232)
3333
3434const (
35- Version = "go-spring@v1.1.3 "
35+ Version = "go-spring@v1.2.0.rc "
3636 Website = "https://go-spring.com/"
3737)
3838
3939/************************************ arg ***********************************/
4040
4141type Arg = gs.Arg
4242
43- // NilArg returns a ValueArg with a nil value.
44- func NilArg () gs_arg.ValueArg {
45- return gs_arg .Nil ()
46- }
47-
4843// TagArg returns a TagArg with the specified tag.
4944func TagArg (tag string ) gs_arg.TagArg {
5045 return gs_arg.TagArg {Tag : tag }
5146}
5247
48+ // NilArg returns a ValueArg with a nil value.
49+ func NilArg () gs_arg.ValueArg {
50+ return gs_arg .Nil ()
51+ }
52+
5353// ValueArg returns a ValueArg with the specified value.
5454func ValueArg (v interface {}) gs_arg.ValueArg {
5555 return gs_arg .Value (v )
@@ -129,7 +129,7 @@ func Or(conditions ...Condition) Condition {
129129 return gs_cond .Or (conditions ... )
130130}
131131
132- // And creates a Condition that is true if all of the given Conditions are true.
132+ // And creates a Condition that is true if all the given Conditions are true.
133133func And (conditions ... Condition ) Condition {
134134 return gs_cond .And (conditions ... )
135135}
@@ -146,36 +146,30 @@ func OnProfile(profile string) Condition {
146146
147147/************************************ ioc ************************************/
148148
149- type (
150- BeanSelector = gs.BeanSelector
151- )
152-
153- type (
154- Properties = gs.Properties
155- )
156-
157149type (
158150 Context = gs.Context
159151 ContextAware = gs.ContextAware
160152)
161153
162154type (
155+ Properties = gs.Properties
163156 Refreshable = gs.Refreshable
164157 Dync [T any ] = gs_dync.Value [T ]
165158)
166159
167160type (
161+ RegisteredBean = gs.RegisteredBean
162+ BeanDefinition = gs.BeanDefinition
163+ )
164+
165+ type (
166+ BeanSelector = gs.BeanSelector
168167 BeanInitFunc = gs.BeanInitFunc
169168 BeanDestroyFunc = gs.BeanDestroyFunc
170169 BeanInitInterface = gs.BeanInitInterface
171170 BeanDestroyInterface = gs.BeanDestroyInterface
172171)
173172
174- type (
175- RegisteredBean = gs.RegisteredBean
176- BeanDefinition = gs.BeanDefinition
177- )
178-
179173// NewBean creates a new BeanDefinition.
180174var NewBean = gs_core .NewBean
181175
@@ -188,6 +182,14 @@ func BeanSelectorForType[T any]() BeanSelector {
188182
189183var boot * gs_app.Boot
190184
185+ // Boot initializes and returns a [*gs_app.Boot] instance.
186+ func Boot () * gs_app.Boot {
187+ if boot == nil {
188+ boot = gs_app .NewBoot ()
189+ }
190+ return boot
191+ }
192+
191193// bootRun runs the boot process.
192194func bootRun () error {
193195 if boot != nil {
@@ -199,14 +201,6 @@ func bootRun() error {
199201 return nil
200202}
201203
202- // Boot initializes and returns a [gs_app.Boot] instance.
203- func Boot () * gs_app.Boot {
204- if boot == nil {
205- boot = gs_app .NewBoot ()
206- }
207- return boot
208- }
209-
210204/*********************************** app *************************************/
211205
212206type (
@@ -246,6 +240,11 @@ func Config() *gs_conf.AppConfig {
246240 return app .P
247241}
248242
243+ // RefreshProperties refreshes the app configuration.
244+ func RefreshProperties (p Properties ) error {
245+ return app .C .RefreshProperties (p )
246+ }
247+
249248// Object registers a bean definition for a given object.
250249func Object (i interface {}) * RegisteredBean {
251250 b := NewBean (reflect .ValueOf (i ))
@@ -284,11 +283,6 @@ func Server(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean {
284283 return app .C .Register (b )
285284}
286285
287- // RefreshProperties refreshes the app configuration.
288- func RefreshProperties (p Properties ) error {
289- return app .C .RefreshProperties (p )
290- }
291-
292286/********************************** banner ***********************************/
293287
294288var appBanner = `
0 commit comments