增加版本信息
This commit is contained in:
parent
eb9a002f6f
commit
5a81d815c0
|
|
@ -0,0 +1,13 @@
|
|||
package org.jetlinks.community;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public class Version {
|
||||
public static Version current = new Version();
|
||||
|
||||
private final String edition = "community";
|
||||
|
||||
private final String version = "1.3.0-SNAPSHOT";
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package org.jetlinks.community.standalone.web;
|
||||
|
||||
import org.hswebframework.web.authorization.annotation.Authorize;
|
||||
import org.jetlinks.community.Version;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
@RequestMapping("/system")
|
||||
@RestController
|
||||
public class SystemInfoController {
|
||||
|
||||
@GetMapping("/version")
|
||||
@Authorize(ignore = true)
|
||||
public Mono<Version> getVersion() {
|
||||
return Mono.just(Version.current);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue