小编Thi*_*mal的帖子

Spring boot - 无法代理接口实现方法 - WARN 消息

从 Spring boot 1.5.x 开始,我收到以下警告消息:

     :: Spring Boot ::        (v2.0.0.RELEASE)

2018-03-17 18:58:18.546  WARN 27877 --- [  restartedMain] o.s.a.f.CglibAopProxy                    : Unable to proxy interface-implementing method [public final void org.springframework.web.context.support.WebApplicationObjectSupport.setServletContext(javax.servlet.ServletContext)] because it is marked as final: Consider using interface-based JDK proxies instead!
2018-03-17 18:58:18.551  WARN 27877 --- [  restartedMain] o.s.a.f.CglibAopProxy                    : Unable to proxy interface-implementing method [public final void org.springframework.context.support.ApplicationObjectSupport.setApplicationContext(org.springframework.context.ApplicationContext) throws org.springframework.beans.BeansException] because it is marked as final: Consider using interface-based JDK proxies instead!
2018-03-17 18:58:18.937  WARN 27877 --- [  restartedMain] o.s.a.f.CglibAopProxy …
Run Code Online (Sandbox Code Playgroud)

spring cglib spring-boot

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

Janusgraph:无法实例化实现:org.janusgraph.diskstorage.cql.CQLStoreManager

我有一个应用程序,它使用嵌入式 janusgraph 和 cassandra 作为后端数据库。

以前,我使用 cassandrathrift 进行连接,并且工作正常。以下是旧配置:

storage.backend=cassandrathrift
storage.cassandra.keyspace=t_graph
Run Code Online (Sandbox Code Playgroud)

但我在超时方面遇到了一些问题。因此,我将配置从 cassandrathrift 更改为 cql。这是新配置:

storage.backend=cql
storage.cql.keyspace=t_graph
storage.cql.read-consistency-level=ONE
Run Code Online (Sandbox Code Playgroud)

而且,现在我收到以下错误:

> Caused by: org.springframework.beans.factory.BeanCreationException:
> Could not autowire field: private in.graph.services.GraphService
> in.graph.services.FollowService.graphService; nested exception is
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'graphService': Invocation of init method
> failed; nested exception is java.lang.IllegalArgumentException: Could
> not instantiate implementation:
> org.janusgraph.diskstorage.cql.CQLStoreManager    at
> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
>   at
> org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
>   at
> org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
>   ... 28 common frames omitted Caused by:
> …
Run Code Online (Sandbox Code Playgroud)

graph cql cassandra janusgraph

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

Netbeans:java.lang.UnsatisfiedLinkError:java.library.path 中没有启动画面:

我正在尝试启动 Netbeans,但它没有打开。我也尝试使用命令行。但是在命令行中我收到以下错误:

java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path: [/usr/java/packages/lib, /usr/lib/x86_64-linux-gnu/jni, /lib/x86_64-linux-gnu, /usr/lib/x86_64-linux-gnu, /usr/lib/jni, /lib, /usr/lib]
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2670)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:806)
    at java.base/java.lang.System.loadLibrary(System.java:1909)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:134)
    at java.desktop/java.awt.SplashScreen$1.run(SplashScreen.java:132)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
    at java.desktop/java.awt.SplashScreen.getSplashScreen(SplashScreen.java:131)
    at org.netbeans.core.startup.Splash.<init>(Splash.java:122)
    at org.netbeans.core.startup.Splash.getInstance(Splash.java:60)
    at org.netbeans.core.startup.Main.start(Main.java:271)
    at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:98)
    at java.base/java.lang.Thread.run(Thread.java:830)
Run Code Online (Sandbox Code Playgroud)

java netbeans

5
推荐指数
2
解决办法
5396
查看次数

如何在 PostgreSQL 中列出表的所有约束?

如何在 PostgreSQL 中列出表的所有约束(主键、外键、检查、唯一互斥、..)?

postgresql constraints

5
推荐指数
4
解决办法
6256
查看次数

如何更新 Pgadmin4 docker 镜像?

如何更新Pgadmin4docker镜像而不丢失文件夹中的任何用户信息/var/lib/pgadmin

postgresql docker pgadmin-4

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

如何在docker中公开${PORT} spring boot应用程序随机端口?

如何${PORT}在 中公开 Spring Boot 应用程序docker

Spring Boot 应用程序在随机端口上启动,我必须在 docker 中公开相同的端口。

是否可以?

port docker spring-boot

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

如何解决“Spring Cloud LoadBalancer 当前正在使用默认缓存。您可以切换到使用 Caffeine 缓存”警告?

如何解决Spring Cloud LoadBalancer is currently working with the default cache. You can switch to using Caffeine cache, by adding it to the classpath.spring boot中的警告?

java spring-boot caffeine caffeine-cache

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

Spring Boot 3及以上版本如何允许所有匿名访问?

Spring Boot从2.7.6升级到3.0.0后,公共API无法访问。

@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
    return http
        .csrf(CsrfConfigurer::disable)
        .authorizeHttpRequests(requests -> requests
            .anyRequest().authenticated())
            .oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt)
            .build();
}

@Bean
public WebSecurityCustomizer webSecurityCustomizer() {
    return web -> web
                     .ignoring()
                         .requestMatchers(CorsUtils::isPreFlightRequest)    
                         .requestMatchers("/actuator/**", "/graphiql/**", "/voyager/**", "/vendor/**", "/rest/**",
                             "/swagger-ui/**", "/v3/api-docs/**");
}
Run Code Online (Sandbox Code Playgroud)

java spring spring-security spring-boot

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

如何在 PostgreSQL 中的数组上添加外键约束?

如何在 PostgreSQL 中的数组上添加外键约束?

角色查找表

CREATE TABLE party_role_cd
(
  party_role_cd bigint NOT NULL,
  code character varying(80) NOT NULL,
  CONSTRAINT party_role_cd PRIMARY KEY (party_role_cd)
);
Run Code Online (Sandbox Code Playgroud)

参与方可以有零个或多个角色 [0-N 关系]

CREATE TABLE party
(
  party_id biging NOT NULL,
  party_role_cd bigint[] NOT NULL,
  CONSTRAINT party_id PRIMARY KEY (party_id)
);
Run Code Online (Sandbox Code Playgroud)

如何在表中添加foreign key约束?party_role_cd arrayparty

arrays postgresql constraints postgresql-12 postgresql-13

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

在春季启动中上传文件大小限制

在版本2.1.0中,spring.servlet.multipart.max-file-size属性无法绑定org.springframework.util.unit.DataSize。

Property : spring.servlet.multipart.maxFileSize= 50Mb
Run Code Online (Sandbox Code Playgroud)

例外

Description:

Failed to bind properties under 'spring.servlet.multipart.max-file-size' to org.springframework.util.unit.DataSize:

Property: spring.servlet.multipart.maxfilesize
Value: 50Mb
Origin: "spring.servlet.multipart.maxFileSize" from property source "bootstrapProperties"
Reason: failed to convert java.lang.String to @org.springframework.boot.convert.DataSizeUnit org.springframework.util.unit.DataSize

Action:

Update your application's configuration
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc spring-boot

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

对于订阅取消异常,哪种 HTTP 状态代码是正确的?

HTTP status code对于例外,哪一个是正确的Subscription Canceled

当用户尝试访问某个页面时,我需要抛出异常。

我检查了一些状态,例如Payment Required,但不满足要求。有什么建议吗?

java rest http http-status-codes spring-boot

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

AWS Chalice 需要 AWS IAM 策略

需要什么 IAM 角色策略AWS Chalice

Github 上没有官方文档吗?

运行需要什么权限AWS Chalice

python amazon-iam aws-lambda chalice

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