Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
upliveapp committed Apr 12, 2019
1 parent 84e125b commit 445d2d8
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,16 @@ Support for grayscale publishing of functions, service downgrade, Automated oper
</dependency>
```

**_ServiceApplication_**
**_controller_**

```
/**
* 输出随机字符串
*
* @author [email protected]
*/
package com.github.xincao9.jswitcher.sample.controller;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class RootController {
Expand All @@ -34,6 +36,25 @@ public class RootController {
return ResponseEntity.ok(RandomStringUtils.randomAscii(128));
}
}
```

**_service application_**

```
package com.github.xincao9.jswitcher.sample;
import com.github.xincao9.jswitcher.api.service.SwitcherService;
import com.github.xincao9.jswitcher.api.vo.QoS;
import com.github.xincao9.jswitcher.spring.boot.starter.EnableJswitcher;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang3.RandomStringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
@EnableJswitcher
Expand Down

0 comments on commit 445d2d8

Please sign in to comment.