Created
October 6, 2021 12:30
-
-
Save iagosousadev/28879d09f92d2ec51b0f8bf5686ac507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package blockly; | |
import org.springframework.web.servlet.support.ServletUriComponentsBuilder; | |
import cronapi.CronapiMetaData; | |
import cronapi.Var; | |
import cronapi.rest.security.CronappSecurity; | |
/** | |
* @author Matheus Portugal | |
* @version 1.0 | |
* @since 2020-09-09 | |
* | |
*/ | |
@CronapiMetaData(type = "blockly", categoryName = "Minhas Funções") | |
@CronappSecurity | |
public class HostApp { | |
@CronapiMetaData(type = "function", name = "Obter URL Base", description = "URL Base") | |
public static Var getUrlBase() throws Exception { | |
final String urlBase = ServletUriComponentsBuilder.fromCurrentContextPath().build().toUriString(); | |
return Var.valueOf(urlBase); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment