Skip to content

Commit dfb5817

Browse files
authored
Merge pull request #376 from lets-blade/dev
Dev
2 parents d32a3ea + 4af9cd9 commit dfb5817

File tree

20 files changed

+241
-57
lines changed

20 files changed

+241
-57
lines changed
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
2+
name: 🐛 Bug Report
3+
about: Report a general framework issue. help us improve this framework.
54
---
65

7-
**Describe the bug**
6+
- System Version (e.g. Mac Os 10.14.3):
7+
- Build tools (e.g. maven/gradle):
8+
- JDK Version (e.g. e.g `2.0.8-R1`):
9+
- Database Version:
10+
11+
### Describe the bug
812

913
A clear and concise description of what the bug is.
1014

11-
**To Reproduce**
15+
### To Reproduce
1216

1317
Steps to reproduce the behavior:
1418

@@ -17,14 +21,14 @@ Steps to reproduce the behavior:
1721
3. JDK version and blade version(e.g `2.0.8-R1`)
1822
4. See error
1923

20-
**Expected behavior**
24+
### Expected behavior:
2125

2226
A clear and concise description of what you expected to happen.
2327

24-
**Screenshots**
28+
### Screenshots:
2529

2630
If applicable, add screenshots to help explain your problem.
2731

28-
**Additional context**
32+
### Additional context:
2933

3034
Add any other context about the problem here.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: 📚 Documentation Issue
3+
about: For documentation issues, open a pull request at https://github.com/lets-blade/lets-blade.github.io
4+
5+
---
6+
7+
The blade documentation has its own dedicated repository. Please open a pull request at https://github.com/lets-blade/lets-blade.github.io to correct the issue you have found.
8+
9+
Thanks!
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
---
2-
name: Feature request
3-
about: Suggest an idea for this project
2+
name: Feature Request
3+
about: For ideas or feature requests
44

55
---
66

7-
**Is your feature request related to a problem? Please describe.**
7+
### Is your feature request related to a problem? Please describe.**
88

99
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
1010

11-
**Describe the solution you'd like**
11+
### Describe the solution you'd like
1212

1313
A clear and concise description of what you want to happen.
1414

15-
**Describe alternatives you've considered**
15+
### Describe alternatives you've considered**
1616

1717
A clear and concise description of any alternative solutions or features you've considered.
1818

19-
**Additional context**
19+
### Additional context
2020

2121
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/general_question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: General question
2+
name: 🍻 General Question
33
about: Template for asking question
44

55
---

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ Run with `Maven`:
6565
<dependency>
6666
<groupId>com.bladejava</groupId>
6767
<artifactId>blade-mvc</artifactId>
68-
<version>2.0.15.ALPHA</version>
68+
<version>2.0.15.BETA</version>
6969
</dependency>
7070
```
7171

7272
or `Gradle`:
7373

7474
```sh
75-
compile 'com.bladejava:blade-mvc:2.0.15.ALPHA'
75+
compile 'com.bladejava:blade-mvc:2.0.15.BETA'
7676
```
7777

7878
Write the `main` method and the `Hello World`:

README_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<dependency>
6262
<groupId>com.bladejava</groupId>
6363
<artifactId>blade-mvc</artifactId>
64-
<version>2.0.15.ALPHA</version>
64+
<version>2.0.15.BETA</version>
6565
</dependency>
6666
```
6767

@@ -70,7 +70,7 @@
7070
或者 `Gradle`:
7171

7272
```sh
73-
compile 'com.bladejava:blade-mvc:2.0.15.ALPHA'
73+
compile 'com.bladejava:blade-mvc:2.0.15.BETA'
7474
```
7575

7676
编写 `main` 函数写一个 `Hello World`

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.bladejava</groupId>
77
<artifactId>blade-mvc</artifactId>
8-
<version>2.0.15.ALPHA</version>
8+
<version>2.0.15.BETA</version>
99
<packaging>jar</packaging>
1010

1111
<name>blade</name>

src/main/java/com/blade/Blade.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.blade.kit.BladeKit;
2525
import com.blade.kit.JsonKit;
2626
import com.blade.kit.StringKit;
27+
import com.blade.kit.UncheckedFnKit;
2728
import com.blade.kit.reload.FileChangeDetector;
2829
import com.blade.loader.BladeLoader;
2930
import com.blade.mvc.handler.*;
@@ -832,8 +833,14 @@ public Blade watchEnvChange(boolean watchEnvChange) {
832833
*
833834
* @return return blade instance
834835
*/
835-
public Blade start() {
836-
return this.start(null, null);
836+
public Blade start(String... args) {
837+
Class caller = Arrays.stream(Thread.currentThread().getStackTrace())
838+
.filter(st -> "main".equals(st.getMethodName()))
839+
.findFirst()
840+
.map(StackTraceElement::getClassName)
841+
.map(UncheckedFnKit.function(Class::forName))
842+
.orElse(null);
843+
return this.start(caller, args);
837844
}
838845

839846
/**

src/main/java/com/blade/ioc/annotation/Bean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @author <a href="mailto:biezhi.me@gmail.com" target="_blank">biezhi</a>
99
* @since 1.5
1010
*/
11-
@Target(ElementType.TYPE)
11+
@Target({ElementType.TYPE, ElementType.METHOD})
1212
@Retention(RetentionPolicy.RUNTIME)
1313
@Documented
1414
public @interface Bean {
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package com.blade.ioc.annotation;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* @author <a href="mailto:fishlikewater@126.com" target="_blank">zhangx</a>
7+
* @since 2.0.15
8+
**/
9+
@Target(ElementType.TYPE)
10+
@Retention(RetentionPolicy.RUNTIME)
11+
@Documented
12+
public @interface Configuration {
13+
14+
String name() default "";
15+
}

0 commit comments

Comments
 (0)