标签: endpoint

访问 localhost:8080/actuator 端点(使用弹簧引导执行器)

在 spring文档中,我已经阅读了由执行器依赖项提供的名为“执行器”的端点,但我没有设法在我的本地测试应用程序上访问它。

问题:有人知道如何访问该端点吗?如果可能的话,粗略的:)
子问题 1:如果这个端点存在,那么为什么它是隐藏的?
子问题 2:如果此端点不存在,我们如何通知 spring.io 更正文档页面(打开某种票证)?

细节:

  • 我想完全访问“执行器”端点,而不是 Spring Boot 执行器提供的其他端点(本地主机:8080/actuator)
  • 是的,我尝试在属性文件中手动启用该端点(endpoints.enabled=true OR endpoints.actuator.enabled=true)
  • 是的,我尝试启用/禁用 endpoints.sencitive 属性
  • 是的,执行器的其他端点工作正常
  • 我没有特别的理由需要它,只是想尝试一下(只是学习新东西:))
  • 请不要只回答“没有这样的端点老兄!”,应该有某种原因将它写在文档中
  • 请使用我现在使用的 spring boot 版本,然后再回答“它对我有用这些配置”(spring boot 版本:1.5.4.RELEASE
  • 先感谢您 :)

endpoint spring-boot spring-boot-actuator

1
推荐指数
1
解决办法
2868
查看次数

Service Fabric - 具有相同端点的多个服务

有没有办法让同一个集群中的多个不同的SF服务监听同一个端点http 80?服务的 WebAPI 具有不同的路由。

<Endpoint Protocol="http" Name="ServiceEndpoint" Type="Input" Port="80" />
Run Code Online (Sandbox Code Playgroud)

我收到一个错误:

无法绑定到地址http://[::]:80 : 地址已被使用。

有没有办法避免这种情况?

http endpoint azure-service-fabric asp.net-core asp.net-core-webapi

1
推荐指数
1
解决办法
1258
查看次数

使用 Gorilla Mux 端点通过 HTTP 流式传输数据

在我的 REST 端点上收到请求后,我想回复状态200和连续生成和刷新的数据主体(从数据库获取,可能非常大)。我正在寻找一种使用Gorilla Mux的有效方法,因为它已在整个项目中使用。

我看到了,这是可能的Labstack回声,因为它的ResponseWriter 支持 http.Flusher界面允许HTTP处理程序,以冲洗缓冲的数据到客户端)。不幸的是,似乎大猩猩的ResponseWriter不支持这一点。


问题:

  • 有没有办法让 Gorilla Mux 出现这种行为?
  • 如果没有,我会很感激一个指向“最薄”方法的指针来实现这种行为(我已经找到了 Labstack Echo,但也许有更好的方法?)

不变量:

  • 我不能使用WebSockets并且应该将解决方案与 REST API 集成。
  • 我将无法在服务器内存中保存整个文件。

rest flush go endpoint mux

1
推荐指数
1
解决办法
910
查看次数

为 Wordpress API 添加自定义端点

我想使用其 API 方法为 Wordpress 构建一些自定义 API 端点,并参考本文档

https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/

我发现他们解释了一切,但我不知道从哪里开始我应该在哪里设置我的文件或在哪里设置它们。

需要知道在哪些文件中设置代码或将生成新的 .php 并包含它???

另外,如果有的话可以参考任何教程来在 WordPress 中为此插件构建自定义端点

ByConsole Woocommerce 订单交付时间管理

预先感谢,关于重复,这里不重复,我询问在哪里设置我的代码而不是如何使用它。

php api wordpress endpoint

1
推荐指数
1
解决办法
3690
查看次数

如何使用 Dart 从 url 中提取端点

我的应用程序扫描二维码以获取如下网址:http://website/api/123-5678-34234

我正在寻找优雅的解决方案来提取端点(123-5678-34234),而无需迭代整个网址字符

string parsing endpoint dart flutter

1
推荐指数
1
解决办法
2985
查看次数

如何使用 Azure CLI 获取与事件中心兼容的终结点连接字符串

我正在尝试使用 Azure CLI 获取物联网中心中存在的“事件中心兼容终结点”的连接字符串。有没有命令可以获取连接字符串信息?

azure endpoint azure-eventhub azure-cli azure-iot-hub

1
推荐指数
1
解决办法
714
查看次数

WooCommerce 我的帐户自定义端点菜单项

我正在开发一个项目,其中我的帐户页面是主页。所以我所做的就是创建了一个包含短代码的页面[woocommerce_my_account],并从仪表板->设置->阅读将此页面设为主页。一切正常。我也有这个工作端点:

  • mydomain.com/orders
  • mydomain.com/编辑地址

但当我制作自定义 myaccount 端点时,我遇到了麻烦。我用这种传统的方式来做:

add_action('woocommerce_account_custom-endpoint_endpoint', function(){
    echo 'hello'; 
} );

add_action('init', function() {
    add_rewrite_endpoint('custom-endpoint', EP_ROOT | EP_PAGES); 
});
Run Code Online (Sandbox Code Playgroud)

但 mydomain.com/custom-endpoint 并不是指向我的帐户页面,而是指向 index.php 或 page.php (WordPress 模板层次结构)。

我很好奇为什么会发生这种情况?

php wordpress endpoint woocommerce hook-woocommerce

1
推荐指数
1
解决办法
2150
查看次数

ASP.Net Core 6、SPA、端点 - 我无法从 http get 请求调用控制器

[已解决] - 评论中的解决方案

[问题]

我是这个行业的新手,所以请原谅我提出一个新手问题,但我现在在 ASP.Net Core 6 上挣扎,我认为我错过了一些简单的东西,但我完全陷入困境......所以,我尝试使用 C# 和 Angular SPA 制作一个简单的应用程序来计算 BMI。我在 .Net Core 5 中做到了,它工作正常,但由于某种原因,当我逐字复制所有函数时,它不想调用 .Net Core 6 中的控制器方法。我开始搜索5 和 6 版本之间发生了哪些变化,我发现 Startup.cs 丢失了,相反,他们将其与 Program.cs 合并。这会是一个“问题”吗?您可以在下面找到我的 TS 组件代码和控制器代码。如果你能给出任何提示可能是什么问题以及为什么它适用于 5,但不适用于 6...

现在,我只想从 BmiController 调用 Get() 方法并接收 200 状态代码,仅此而已,但每次发送 http get 请求时,我都会收到 404 not found。

预先感谢您的帮助:)

程序.cs

using BMICalculatorCore.Core;
using BMICalculatorCore.Core.Interfaces;

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.

builder.Services.AddTransient<ICalculator, MetricCalculator>();

builder.Services.AddControllersWithViews();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
    // …
Run Code Online (Sandbox Code Playgroud)

c# endpoint single-page-application asp.net-core angular

1
推荐指数
1
解决办法
4122
查看次数

Sveltekit 制作联系表单的端点问题

我正在制作联系表格,但收到错误 POST http://localhost:3000/contact.json 500 (Internal Server Error)at contactform.svelte:5。这是什么contactform.svelte

<script>
    const submitForm = async(data) => {
        const formData = new FormData(data.currentTarget);

        const res = await fetch("contact.json", {
            method: "POST",
            body: formData,
        });
    };
</script>

<form on:submit|preventDefault={submitForm}>
    <div>
        <label for="">
            What's your name?
            <input type="text" name="name">
        </label>
    </div>

    <div>
        <label for="">
            What's your Email or Phone #?
            <input type="email" name="email">
            <input type="text" name="phone">

        </label>
    </div>

    <div>
        <label for="">
            What would you like to tell us?
            <input type="text" name="message"> …
Run Code Online (Sandbox Code Playgroud)

javascript endpoint svelte sveltekit

1
推荐指数
1
解决办法
2527
查看次数

Dotnet 无法识别带有 Angular 前端的控制器

我创建了以下 PersonController.cs:

using Microsoft.AspNetCore.Mvc;
using PersonApi.Models;

namespace donau_lead_generator.Controllers;

[ApiController]
[Route("[controller]")]

public class PersonController : ControllerBase

{
    private readonly ILogger<PersonController> _logger;

public PersonController(ILogger<PersonController> logger)
{
    _logger = logger;
}


[HttpPost("addData")]
public Task<ActionResult<Person>> Post(Person person)
{
    Console.WriteLine("I am here");
    return null;
}
Run Code Online (Sandbox Code Playgroud)

以及以下服务:

import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';


import { Observable } from 'rxjs';
import { Person } from './person';

@Injectable()
export class HomeService {

  constructor(
    private http: HttpClient) {
  }


  /** POST: add a …
Run Code Online (Sandbox Code Playgroud)

.net c# endpoint angular

1
推荐指数
1
解决办法
981
查看次数