Skip to content

Commit 445d2d8

Browse files
committed
ok
1 parent 84e125b commit 445d2d8

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ Support for grayscale publishing of functions, service downgrade, Automated oper
1818
</dependency>
1919
```
2020

21-
**_ServiceApplication_**
21+
**_controller_**
2222

2323
```
24-
/**
25-
* 输出随机字符串
26-
*
27-
* @author xincao9@gmail.com
28-
*/
24+
package com.github.xincao9.jswitcher.sample.controller;
25+
26+
import org.apache.commons.lang3.RandomStringUtils;
27+
import org.springframework.http.ResponseEntity;
28+
import org.springframework.web.bind.annotation.GetMapping;
29+
import org.springframework.web.bind.annotation.RestController;
30+
2931
@RestController
3032
public class RootController {
3133
@@ -34,6 +36,25 @@ public class RootController {
3436
return ResponseEntity.ok(RandomStringUtils.randomAscii(128));
3537
}
3638
}
39+
```
40+
41+
**_service application_**
42+
43+
```
44+
package com.github.xincao9.jswitcher.sample;
45+
46+
import com.github.xincao9.jswitcher.api.service.SwitcherService;
47+
import com.github.xincao9.jswitcher.api.vo.QoS;
48+
import com.github.xincao9.jswitcher.spring.boot.starter.EnableJswitcher;
49+
import java.util.concurrent.TimeUnit;
50+
import org.apache.commons.lang3.RandomStringUtils;
51+
import org.slf4j.Logger;
52+
import org.slf4j.LoggerFactory;
53+
import org.springframework.beans.factory.annotation.Autowired;
54+
import org.springframework.boot.CommandLineRunner;
55+
import org.springframework.boot.SpringApplication;
56+
import org.springframework.boot.autoconfigure.SpringBootApplication;
57+
import org.springframework.context.annotation.Bean;
3758
3859
@SpringBootApplication
3960
@EnableJswitcher

0 commit comments

Comments
 (0)