小编use*_*290的帖子

Project.getConvention() 方法已被弃用

我正在使用 gradle 8.2.1,我的项目在构建时显示以下错误,但没有说明 build.gradle 中哪一行失败。如何发现问题?

> Configure project :
The Project.getConvention() method has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_8.html#deprecated_access_to_conventions
The org.gradle.api.plugins.Convention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_8.html#deprecated_access_to_conventions
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.2.1/userguide/upgrading_version_8.html#java_convention_deprecation

BUILD SUCCESSFUL …
Run Code Online (Sandbox Code Playgroud)

gradle

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

我应该使用什么 JPA + Hibernate 数据类型来支持 PostgreSQL 数据库中的向量扩展?

我应该使用什么 JPA + Hibernate 数据类型来支持 PostgreSQL 数据库中的向量扩展,以便它允许我使用 JPA 实体创建嵌入?

CREATE TABLE items (id bigserial PRIMARY KEY, embedding vector(3));
Run Code Online (Sandbox Code Playgroud)

PG向量

postgresql hibernate jpa vector-database pgvector

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

在ActiveRecord中取消依赖对象

:dependent => :nullify
Run Code Online (Sandbox Code Playgroud)

为什么我要使依赖对象无效,因为我没有看到孤立数据库记录的目的.

activerecord ruby-on-rails

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

如何查找列名是否是跨各种数据库的保留关键字

我们有一个遗留模式文件,其中包含以下列名称,如果我们将应用程序移植到h2,mysql,postgres或oracle,我们想了解它们是否会导致问题.

例如,我如何知道在下面列出的数据库中使用它是否正常.有没有什么好的工具可以对此进行初步检查?

key
when
size
type
count
from
with
Run Code Online (Sandbox Code Playgroud)

mysql oracle postgresql h2

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

NativeSearchQuery 已弃用,5.0 后的等效项是什么

5.0 以上的支持与 org.springframework.data.elasticsearch.core.query.NativeSearchQuery 等效。

迁移了以下代码片段

    NativeSearchQuery query = new NativeSearchQueryBuilder()
            .withSourceFilter(new FetchSourceFilterBuilder().withIncludes().build())
            .withQuery(QueryBuilders.termQuery(Configuration.CONFIGURATION_TYPE, field))
            .withSorts(new FieldSortBuilder(Configuration.NAME).order(SortOrder.ASC)).withPageable(pageable)
            .build();
Run Code Online (Sandbox Code Playgroud)

到以下查询,但失败

import org.springframework.data.elasticsearch.client.elc.NativeQuery;
import org.springframework.data.elasticsearch.client.elc.NativeQueryBuilder;


    NativeQuery query = new NativeQueryBuilder()
            .withSourceFilter(new FetchSourceFilterBuilder().withIncludes().build())
            .withQuery(QueryBuilders.termQuery(Configuration.CONFIGURATION_TYPE, field))
            .withSorts(new FieldSortBuilder(Configuration.NAME).order(SortOrder.ASC)).withPageable(pageable)
            .build();
Run Code Online (Sandbox Code Playgroud)

java elasticsearch spring-data-elasticsearch

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

如何排除 java-catalog build.gradle 文件中的依赖项

Java目录引用snakeyaml如下

Java目录build.gradle声明库('snakeyaml', 'org.yaml', 'snakeyaml').version('2.0')

编译抛出以下错误,如何在java目录本身中执行exlcude以避免加载android.jar

* What went wrong:
Execution failed for task ':compileTestJava'.
> Could not resolve all files for configuration ':testCompileClasspath'.
   > Could not find snakeyaml-2.0-android.jar (org.yaml:snakeyaml:2.0).
     Searched in the following locations:
         https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/2.0/snakeyaml-2.0-android.jar

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org
Run Code Online (Sandbox Code Playgroud)

java gradle

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

如何使命名实体识别提供更好的数据分类

以下是新闻文章中数据的默认分类。

Christiane Amanpour 268 287 PERSON
Hamas 155 160 ORG
Rania 6 11 PERSON
Warner 0 6 ORG
Run Code Online (Sandbox Code Playgroud)

但我想改变行为如下

I would want to categorize `Christiane Amanpour` as a journalist
I would want to categorize `Rania` as a queen
I would want to categorize `Warner` as a cricket player
Run Code Online (Sandbox Code Playgroud)

我到底如何训练数据来做到这一点

nlp spacy large-language-model

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

如何在 JPA 中强制验证至少一个非空字段

如何在 JPA 中强制验证至少一个非空字段。所有字段都可为空,但至少应存在其中一个字段才能持久保存。如何在 JPA 中强制执行此验证。

@Entity
@Table(name = "social")
public class Social {

    @Column(name = "website", nullable = true)
    private String website;

    @Column(name = "facebook", nullable = true)
    private String facebook;

    @Column(name = "instagram", nullable = true)
    private String instagram;
}
Run Code Online (Sandbox Code Playgroud)

hibernate jpa spring-data-jpa

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

如何从CentOS中删除golang包

如何从CentOS中删除golang包.我无法"yum remove golang",因为它返回一个无匹配错误.如何在CentOS上执行通配符删除以删除所有以下包

golang.x86_64                           1.6.3-2.el7                    base     
golang-bin.x86_64                       1.6.3-2.el7                    base     
golang-bitbucket-kardianos-osext-devel.noarch
golang-bitbucket-ww-goautoneg-devel.noarch
golang-bitbucket-ww-goautoneg-unit-test.x86_64
golang-cover.x86_64                     0-1.0.hgd32b5854c941.el7       epel     
golang-docs.noarch                      1.6.3-2.el7                    base     
golang-github-codegangsta-cli-devel.noarch
golang-github-coreos-go-log-devel.noarch
golang-github-coreos-go-systemd-devel.noarch
golang-github-cpuguy83-go-md2man.x86_64 1.0.4-2.el7_2                  base     
golang-github-cpuguy83-go-md2man-devel.noarch
golang-github-docopt-docopt-go-devel.noarch
golang-github-fsouza-go-dockerclient-devel.x86_64
golang-github-godbus-dbus-devel.noarch  0-0.1.gitcb98efb.el7.centos    extras   
golang-pkg-linux-386.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-linux-amd64.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-linux-arm.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-386.noarch            1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-amd64.noarch          1.4.2-1.el7.centos             extras   
golang-pkg-netbsd-arm.noarch            1.4.2-1.el7.centos             extras   
golang-pkg-openbsd-386.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-openbsd-amd64.noarch         1.4.2-1.el7.centos             extras   
golang-pkg-plan9-386.noarch             1.4.2-1.el7.centos             extras   
golang-pkg-plan9-amd64.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-windows-386.noarch           1.4.2-1.el7.centos             extras   
golang-pkg-windows-amd64.noarch         1.4.2-1.el7.centos             extras   
golang-src.noarch                       1.6.3-2.el7                    base     
golang-tests.noarch                     1.6.3-2.el7                    base     
golang-vet.x86_64                       0-1.0.hgd32b5854c941.el7       epel     
golang-vim.noarch                       1.3.3-2.el7_0                  extras   
Run Code Online (Sandbox Code Playgroud)

linux centos yum go

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