- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Spring Boot执行器已包含在POM中,并显示在启动日志中。
但是,当我尝试访问/ actuator甚至项目的基本URL时,都会得到以下内容-
{
"timestamp": 1577096144986,
"status": 401,
"error": "Unauthorized",
"message": "Full authentication is required to access this resource",
"path": "/actuator"
}
2019-12-23 19:30:54,489 75773 [XNIO-3 task-3] INFO c.c.common.web.LoggerInterceptor [LoggerInterceptor.java:42] - Visitor [okp91Dj1NzT2KPPUjaUvhqEg4oOhwPQ49I9LTR2z] [GET] [/error] [1ms] [OK]
2019-12-23 19:30:54,493 75777 [XNIO-3 task-3] ERROR org.apache.velocity [CommonsLogLogChute.java:96] - ResourceManager : unable to find resource 'error.vm' in any resource loader.
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:META-INF/spring/applicationContext*.xml
classpath*:com.packagename
/WEB-INF/spring/oauth-security.xml
/WEB-INF/spring/security-config.xml
classpath*:META-INF/gateway/*.xml
</param-value>
</context-param>
<sec:http pattern="/service/v2/**"
create-session="never"
entry-point-ref="oauthAuthenticationEntryPoint"
access-decision-manager-ref="accessDecisionManager">
<sec:intercept-url pattern="/some/path/v2/profile/**" access="ROLE_USER,SCOPE_PROFILE" method="GET"/>
<sec:http pattern="/somepath/**">
<sec:intercept-url pattern="/somepath/**" access="ROLE_USER"/>
<sec:http-basic/>
</sec:http>
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
<property name="ignoreResourceNotFound" value="true" />
<property name="locations">
<list>
<value>classpath:/spring/application.properties</value>
<value>classpath:/spring/local.properties</value>
<value>classpath:/spring/customscopes.properties</value>
<value> file:${project.config.dir}/application.properties </value>
<value>file:${project.config.dir}/customscopes.properties</value>
</list>
</property>
</bean>
<sec:intercept-url pattern="/service/v2/path/**" access="SCOPE_SOMETHING"/>
service/v2/path/**=IS_AUTHENTICATED_ANONYMOUSLY;
<sec:http pattern="/favicon.ico" security="none"/>
2019-12-24 12:31:03,051 590999 [XNIO-3 task-16] INFO c.c.common.web.LoggerInterceptor [LoggerInterceptor.java:42] - Visitor [OICBz6CqYzI58UqobnBYNEXsZUNErjBkv6wEUUkX] [GET] [/error] [2ms] [OK]
2019-12-24 12:31:03,054 591002 [XNIO-3 task-16] ERROR org.apache.velocity [CommonsLogLogChute.java:96] - ResourceManager : unable to find resource 'error.vm' in any resource loader.
2019-12-24 12:31:18,641 606589 [XNIO-3 task-20] ERROR org.apache.velocity [CommonsLogLogChute.java:96] - ResourceManager : unable to find resource 'error.vm' in any resource loader.
2019-12-24 12:31:18,912 606860 [XNIO-3 task-21] INFO c.c.common.web.LoggerInterceptor [LoggerInterceptor.java:42] - Visitor [OICBz6CqYzI58UqobnBYNEXsZUNErjBkv6wEUUkX] [GET] [/favicon.ico] [2ms] [OK]
2019-12-24 12:31:03,051 590999 [XNIO-3 task-16] INFO c.c.common.web.LoggerInterceptor [LoggerInterceptor.java:42] - Visitor [OICBz6CqYzI58UqobnBYNEXsZUNErjBkv6wEUUkX] [GET] [/error] [2ms] [OK]
2019-12-24 12:31:03,054 591002 [XNIO-3 task-16] ERROR org.apache.velocity [CommonsLogLogChute.java:96] - ResourceManager : unable to find resource 'error.vm' in any resource loader.
@Override
protected void configure(HttpSecurity http) throws Exception {
http.
authorizeRequests().antMatchers("/service/trace/**").permitAll()
.antMatchers("/service/actuator/**").permitAll()
.antMatchers("/actuator/**").permitAll()
.antMatchers("/trace").permitAll()
.antMatchers("/actuator").permitAll();
}
{
"timestamp": 1577181851520,
"status": 404,
"error": "Not Found",
"message": "Not Found",
"path": "/service/trace"
}
http://localhost:8083/service/actuator/beans
http://localhost:8083/actuator/beans
http://localhost:8083/beans
{
"timestamp": 1577181062281,
"status": 403,
"error": "Forbidden",
"message": "Could not verify the provided CSRF token because your session was not found.",
"path": "/service/v2/some/end/point"
}
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
2019-12-24 14:14:10,769 14209 [main] INFO o.s.b.a.e.m.EndpointHandlerMapping [AbstractHandlerMethodMapping.java:543] - Mapped "{[/beans || /beans.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-12-24 14:14:10,770 14210 [main] INFO o.s.b.a.e.m.EndpointHandlerMapping [AbstractHandlerMethodMapping.java:543] - Mapped "{[/health || /health.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.HealthMvcEndpoint.invoke(javax.servlet.http.HttpServletRequest,java.security.Principal)
2019-12-24 14:14:10,771 14211 [main] INFO o.s.b.a.e.m.EndpointHandlerMapping [AbstractHandlerMethodMapping.java:543] - Mapped "{[/autoconfig || /autoconfig.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
2019-12-24 14:14:10,772 14212 [main] INFO o.s.b.a.e.m.EndpointHandlerMapping [AbstractHandlerMethodMapping.java:543] - Mapped "{[/metrics/{name:.*}],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.MetricsMvcEndpoint.value(java.lang.String)
2019-12-24 14:14:10,772 14212 [main] INFO o.s.b.a.e.m.EndpointHandlerMapping [AbstractHandlerMethodMapping.java:543] - Mapped "{[/metrics || /metrics.json],methods=[GET],produces=[application/vnd.spring-boot.actuator.v1+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
最佳答案
由于未在端点上启用安全性,因此发生错误。
对于本地部署的应用程序,将以下配置添加到application.properties文件中-
management.security.enabled = false
在生产应用程序上,需要进行更仔细的配置。
关于java - 无法使执行器端点在旧版Spring Boot项目中工作-获取身份验证页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59456689/
在 spring boot 2 应用程序中,我正在尝试访问执行器端点/beans,就像我之前在 Spring boot 1.5.* 应用程序中所做的那样。但我做不到。此外,我没有在 log.INFO
我正在为资源 items 编写端点,它是 applications 的子资源,如下所示:applications/{:id}/items。项目和应用程序都具有除名称之外的其他属性。 我创造了 GET
我正在创建一个 API,其中基于经过身份验证的用户可以更改对象的不同属性的权限。 解决这个问题的常用方法是什么? 我应该有这样的端点吗 /admin/users 和 /users 具有不同的 API
也许(希望如此)我错过了一些非常简单的东西,但我似乎无法弄清楚。 我有一组我想放在 nghttpx 代理后面的 gRPC 服务。为此,我需要能够使用非根 url 上的 channel 配置我的客户端。
我没有找到法定存款的历史记录(来自银行卡), 这里只有加密存款:https://prnt.sc/ttdwc2= ) 例如,在我的银行帐户界面中,我在 5 月 12 日找到了存款,但在这里找不到...
我很好奇普罗米修斯的工作原理。使用 Prometheus 界面,我可以看到一个下拉列表,我认为其中包含所有可用的指标。但是,我无法访问列出所有抓取的指标的指标端点。 http://targethost
是否可以从 apollo-server-express 上的 GraphQL 端点触发浏览器中的文件下载?应用? 我有一个用标准 express 写的端点 app.get函数(见下文),但我想利用 G
有谁知道在一个请求中获取您上传到媒体库的所有图像的端点吗?我将 next js 与 Strapi 一起使用,需要一种方法来从媒体库中获取所有图像,但似乎没有任何相关文档 最佳答案 /api/上传 GE
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 6 年前。 Improve this qu
我编写了一个简单的 HTTP 监听器并将其部署在 Heroku 应用程序中。我确保在 $PORT 中绑定(bind)端口。 现在,我尝试使用 url name-of-my-app.herokuapp.
我正在尝试构建一个安全系统,用于将数据从客户端 Android 应用程序传输到运行 PHP 的网络服务器。 我想做的是确保系统是加密安全的,这样来自应用程序的消息可以被验证为实际上来自应用程序本身,而
我是 Go 编程语言的新手。尝试使用 gousb访问爱普生收据打印机。 因此,我从存储库中获取了一些示例代码,并对其进行了一些调整,以验证我是否可以访问打印机。 我可以看到打印机并枚举端点。我收到此输
我正在使用 azure API 端点。 ....azure-api.net/...。当我尝试使用 Charles 代理查看 HTTP 请求/响应时,HTTP 响应为空。当我关闭代理时,该请求有效。 我
我正在关注这个tutorial了解用户成功登录后如何获取 token 。 到目前为止我已完成的步骤: 我已使用此 URL 注册了自己(用户名和密码):https://MyCompany.b2clogi
给定一个以 .svc 结尾且应该运行 SOAP 网络服务的 URL,我如何从中获取一些数据? 我试过: 通过网络浏览器访问它 通过 Python 的库 Zeep 访问它 通过 Microsoft 实用
我认为公共(public) REST API(例如注册端点)无法验证用户身份是否正确?例如,我们的端点应该只接受来 self 们的移动应用程序和 future 网络应用程序的请求。 我很确定这在逻辑上
在自托管服务中,我想使用 App.config 中指定的端点(如果存在),或者如果 App.config 为空则使用代码中指定的默认端点。我该怎么做? 编辑:澄清一下,这是在服务器(服务)端使用 Se
我需要在我的后端服务器中实现实时开发者通知,以了解我的用户所做的任何购买修改(暂停帐户、续订订阅等)。我的后端服务器是用 Delphi 制作的,没有现成的 Delphi 库,但是,我可以制作一个 HT
我创建了一个 Kubernetes 服务: [root@Infra-1 kubernetes]# kubectl describe service gitlab Name: git
我正在开发一个应用程序,我需要将对象列表传递给 REST 端点,该端点将进行一些计算并将结果返回给调用者。 问题更多是关于如何处理这种情况的哲学问题? 在 GET 请求中传递大量有效负载是一个坏主意。
我是一名优秀的程序员,十分优秀!