You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/index.md
+67-58Lines changed: 67 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,17 @@
1
1
# Go-Spring
2
2
3
-
<imgalign="right"width="159px"src="/logo.svg"/>
4
-
5
3
`Go-Spring` vision is to empower Go programmers with a powerful programming framework similar to Java `Spring`. It is dedicated to providing users with a simple, secure, and reliable programming experience.
6
4
7
-
This project initial code based from [go-spring/go-spring](https://github.com/go-spring/go-spring) created by [lvan100](https://github.com/lvan100)
8
-
9
5
### Install
10
-
`go get github.com/go-spring-projects/go-spring@latest`
6
+
`go get go-spring.dev/spring@latest`
7
+
8
+
### Features
9
+
***IoC Container**: Implements an inversion of control (IoC) container based on reflection, supporting the injection of structs, functions, and constants. This means you can use the `autowired` tag to automatically inject dependencies without having to manage them manually.
10
+
***Flexible Configuration Management**: Taking inspiration from Spring's @Value annotation, Go-Spring allows you to fetch configuration items from multiple sources (such as environment variables, files, command-line arguments, etc.). This brings unprecedented flexibility in configuration management.
11
+
***Validator Extension for Configuration**: Extends its robust configuration management capabilities with support for custom validator extensions. This enables you to perform validity checks on properties, ensuring only valid configurations are applied to your application.
12
+
***Logger Based on Standard slog**: Provides built-in logger support using the standard library slog for effective and streamlined logging. This enhancement offers clear, concise, and well-structured logging information that aids in system debugging and performance monitoring.
13
+
***Dynamic Property Refreshing**: Provides dynamic property refreshing which lets you update the application properties on-the-fly without needing to reboot your application. It caters to the needs of applications that require high availability and real-time responsiveness.
14
+
***Dependency Ordered Application Events**: Ensures the correct notification of initialization and destruction events according to the lifecycle of objects, following the order of bean dependencies. This enhances the robustness and reliability of the system during its lifecycle operations.
11
15
12
16
### IoC container
13
17
@@ -43,40 +47,43 @@ In addition to implementing a powerful IoC container similar to Java Spring, Go-
@@ -99,13 +106,13 @@ Property binding and bean injection annotations are marked using struct field ta
99
106
100
107
Bind properties to a value, the bind value can be primitive type, map, slice, struct. When binding to struct, the tag 'value' indicates which properties should be bind. The 'value' tags are defined by value:"${a:=b}", 'a' is the property name, 'b' is the default value.
101
108
102
-

109
+

103
110
104
111
##### Dependency Injection
105
112
106
113
Dependency Injection is a design pattern used to implement decoupling between classes and the management of dependencies. It transfers the responsibility of creating and maintaining dependencies to an external container, so that the class does not need to instantiate dependent objects itself. Instead, the external container dynamically injects the dependencies.
107
114
108
-

115
+

109
116
110
117
### Conditional registering
111
118
@@ -179,11 +186,12 @@ In this example, we will use [go-validator/validator](https://github.com/go-vali
0 commit comments