@@ -32,24 +32,24 @@ import (
32
32
)
33
33
34
34
const (
35
- Version = "go-spring@v1.1.3 "
35
+ Version = "go-spring@v1.2.0.rc "
36
36
Website = "https://go-spring.com/"
37
37
)
38
38
39
39
/************************************ arg ***********************************/
40
40
41
41
type Arg = gs.Arg
42
42
43
- // NilArg returns a ValueArg with a nil value.
44
- func NilArg () gs_arg.ValueArg {
45
- return gs_arg .Nil ()
46
- }
47
-
48
43
// TagArg returns a TagArg with the specified tag.
49
44
func TagArg (tag string ) gs_arg.TagArg {
50
45
return gs_arg.TagArg {Tag : tag }
51
46
}
52
47
48
+ // NilArg returns a ValueArg with a nil value.
49
+ func NilArg () gs_arg.ValueArg {
50
+ return gs_arg .Nil ()
51
+ }
52
+
53
53
// ValueArg returns a ValueArg with the specified value.
54
54
func ValueArg (v interface {}) gs_arg.ValueArg {
55
55
return gs_arg .Value (v )
@@ -129,7 +129,7 @@ func Or(conditions ...Condition) Condition {
129
129
return gs_cond .Or (conditions ... )
130
130
}
131
131
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.
133
133
func And (conditions ... Condition ) Condition {
134
134
return gs_cond .And (conditions ... )
135
135
}
@@ -146,36 +146,30 @@ func OnProfile(profile string) Condition {
146
146
147
147
/************************************ ioc ************************************/
148
148
149
- type (
150
- BeanSelector = gs.BeanSelector
151
- )
152
-
153
- type (
154
- Properties = gs.Properties
155
- )
156
-
157
149
type (
158
150
Context = gs.Context
159
151
ContextAware = gs.ContextAware
160
152
)
161
153
162
154
type (
155
+ Properties = gs.Properties
163
156
Refreshable = gs.Refreshable
164
157
Dync [T any ] = gs_dync.Value [T ]
165
158
)
166
159
167
160
type (
161
+ RegisteredBean = gs.RegisteredBean
162
+ BeanDefinition = gs.BeanDefinition
163
+ )
164
+
165
+ type (
166
+ BeanSelector = gs.BeanSelector
168
167
BeanInitFunc = gs.BeanInitFunc
169
168
BeanDestroyFunc = gs.BeanDestroyFunc
170
169
BeanInitInterface = gs.BeanInitInterface
171
170
BeanDestroyInterface = gs.BeanDestroyInterface
172
171
)
173
172
174
- type (
175
- RegisteredBean = gs.RegisteredBean
176
- BeanDefinition = gs.BeanDefinition
177
- )
178
-
179
173
// NewBean creates a new BeanDefinition.
180
174
var NewBean = gs_core .NewBean
181
175
@@ -188,6 +182,14 @@ func BeanSelectorForType[T any]() BeanSelector {
188
182
189
183
var boot * gs_app.Boot
190
184
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
+
191
193
// bootRun runs the boot process.
192
194
func bootRun () error {
193
195
if boot != nil {
@@ -199,14 +201,6 @@ func bootRun() error {
199
201
return nil
200
202
}
201
203
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
-
210
204
/*********************************** app *************************************/
211
205
212
206
type (
@@ -246,6 +240,11 @@ func Config() *gs_conf.AppConfig {
246
240
return app .P
247
241
}
248
242
243
+ // RefreshProperties refreshes the app configuration.
244
+ func RefreshProperties (p Properties ) error {
245
+ return app .C .RefreshProperties (p )
246
+ }
247
+
249
248
// Object registers a bean definition for a given object.
250
249
func Object (i interface {}) * RegisteredBean {
251
250
b := NewBean (reflect .ValueOf (i ))
@@ -284,11 +283,6 @@ func Server(objOrCtor interface{}, ctorArgs ...Arg) *RegisteredBean {
284
283
return app .C .Register (b )
285
284
}
286
285
287
- // RefreshProperties refreshes the app configuration.
288
- func RefreshProperties (p Properties ) error {
289
- return app .C .RefreshProperties (p )
290
- }
291
-
292
286
/********************************** banner ***********************************/
293
287
294
288
var appBanner = `
0 commit comments