小编Ven*_*nky的帖子

天蓝色的 webapps 404 错误

我在 Spring Boot(REST 服务)中开发了 Web 应用程序,该应用程序部署在 Azure webapps(Azure 应用程序服务)上。我的计划是标准:1 小。

该应用程序自 2 周以来一直运行顺利。突然之间,今天,应用程序挂了。调用这些 REST 服务的消费者应用程序开始遇到 404 错误(源服务器没有找到目标资源的当前表示,或者它不愿意透露存在)

当我检查日志时,我没有找到任何会导致整个应用程序宕机的根本原因。这是第二次发生,这次我也无法找到根本原因(内存使用率/CPU 使用率似乎很好)。“始终开启”设置已开启。

我有以下问题:1)可能是根本原因,有没有办法找到它?

2)有没有办法(在 azure webapps 中)知道应用程序何时关闭并自动缩放?(我已经为 CPU 使用率和内存使用率设置了自动缩放规则,但这没有帮助)。

azure-app-service-envrmnt azure-app-service-plans azure-web-app-service

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

invalid_token:无法将访问令牌转换为 JSON

刷新令牌时出错(grant_type=refresh_token)。用户似乎很长时间没有使用该应用程序,并且访问令牌和刷新令牌都已过期。当应用程序现在尝试刷新令牌时,它收到错误

{
"error": "invalid_token",
"error_description": "Cannot convert access token to JSON" 
  }
Run Code Online (Sandbox Code Playgroud)

我看到很多关于这个问题的帖子,但我仍然面临这个错误。我尝试使用 setVerifierKey。但没有运气。这是代码:

@Configuration
   @EnableWebSecurity
   @EnableGlobalMethodSecurity(prePostEnabled = true)
   public class SecurityConfig extends WebSecurityConfigurerAdapter {

@Value("${security.signing-key}")
private String signingKey;

@Value("${security.encoding-strength}")
private Integer encodingStrength;

@Value("${security.security-realm}")
private String securityRealm;

@Autowired
private UserDetailsService userDetailsService;

@Bean
@Override
protected AuthenticationManager authenticationManager() throws Exception {
    return super.authenticationManager();
}

@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
    auth.userDetailsService(userDetailsService);
          //  .passwordEncoder(new ShaPasswordEncoder(encodingStrength));
}

@Override
protected void configure(HttpSecurity http) throws Exception {
    http
            .sessionManagement()
            .sessionCreationPolicy(SessionCreationPolicy.STATELESS)
            .and()
            .httpBasic()
            .realmName(securityRealm)
            .and() …
Run Code Online (Sandbox Code Playgroud)

oauth-2.0 jwt spring-boot

5
推荐指数
0
解决办法
3216
查看次数

手动触发提前输入

我正在将ngx-bootstrap库(Angular6、Bootstrap4)用于 typeahead 组件。当我们开始输入时它运行良好。但我想实现以下目标:

用户有不同的选择。说:ai、ax、az等。用户选择一个,并且预先输入应该自动开始搜索选定的文本。这意味着用户无需在输入框中输入任何内容即可开始搜索,

只需单击其中一个选项,typeahead 将显示可用选项,用户可以选择准确的选项。

所以基本上,我想避免在文本框中手动输入并通过代码触发预输入填充事件。

我能做到吗?

提前致谢,

文奇

ngx-bootstrap

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