All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codingapi.springboot.security.controller.VersionController Maven / Gradle / Ivy

There is a newer version: 3.3.14
Show newest version
package com.codingapi.springboot.security.controller;

import com.codingapi.springboot.framework.dto.response.SingleResponse;
import lombok.AllArgsConstructor;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/open")
@AllArgsConstructor
public class VersionController {

    private final Environment env;

    @GetMapping("/version")
    public SingleResponse version() {
        return SingleResponse.of(env.getProperty("application.version", "-"));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy