intellij-idea 相关问题

IntelliJ IDEA是JetBrains的IDE。它主要支持Java开发,但也支持JavaScript,Groovy,HTML,CSS,RSS,R,Haskell,PHP,Ruby,Python,Scala,Swift,Clojure,Kotlin,Hybris,Gradle等。有关Community和Ultimate Editions中的使用和问题的问题应使用此标记。但是,如果您遇到其他问题并且碰巧使用IntelliJ,请不要使用此标记。

我有2个不同名称的不同包

我最近一直在尝试 Minecraft 模组,但是在导入所需的包时(通过更改 build.gradle),我得到了 2 个具有相同“,,name”的包。 2 包和java导入失败 所以,我...

回答 1 投票 0

不抛出NPE的合约注释

我有这个方法来减少样板代码进行空检查 @Contract("_ -> !失败") @可为空 公共静态 T valueElseNull(@NotNull 最终供应商 供应商) { 尝试...

回答 1 投票 0

IntelliJ 编辑器选项卡:最近使用过的

在我的新团队中,我们正在使用 IntelliJ,并且我非常怀念 Eclipse 的一个功能: 通常情况下,我的编辑器会打开大约 20-30 个文件,但我最多会跳转 2-3 个文件...

回答 2 投票 0

如何在 IntelliJ-IDEA 中查看默认 Java 类实现?

有时我阅读在线 javadoc,仍然想知道特定方法是如何工作的。例如,我最近正在查看 Java-11 的 ArrayList 在线 javadoc,我无法判断“rem...

回答 3 投票 0

如何在 IntelliJ 调试器中显示 Hibernate 3 标准的 sql 查询

我正在开发一个遗留项目,该项目没有像 Maven 或 gradle 那样的任何特定项目结构。我们使用 ant 来构建项目并添加依赖项,就像我们在简单的 java 项目中添加一样......

回答 1 投票 0

在我“更改启动运行时”后,INTELLIJ 崩溃了

我想在我的 intellij 上使用 JDK-11。所以我按照这些说明更改了 java boot 运行时。现在我的 Intellij 没有打开就崩溃了。我正在使用MAC。 崩溃报告。 我发现的最接近的

回答 3 投票 0

如何隐藏PhpStorm / IntelliJ IDEA中的默认放大镜?

我想在 PhpStorm 中隐藏这个放大镜部分。但我不能。谁能帮我解决这个问题吗? 我尝试在设置屏幕中修复此问题,但找不到任何人。 我也面临着同样的问题...

回答 1 投票 0

如何从我的代码中引用配置的数据源(IntelliJ + Python)

我在 IntelliJ 中配置了 Cassandra 数据源(作为全局)。 我可以手动建立会话并从控制台运行 CQL 查询。 如何从 Python 代码中执行此操作,而无需重新输入用户 ID 和

回答 1 投票 0

IntelliJ 可以向我显示 lambda 中参数的完全限定名称吗?

在带有 lambda 的代码中,例如 Vaadin Web 应用程序中的此事件侦听器: someWidget.addValueChangeListener( 事件 -> { …… } ); …我想知道确切的类型,完全合格的

回答 2 投票 0

IntelliJ - 使用 getResource() 找不到资源,出现 nullPointerException

本质上,我正在使用(或尝试使用)Freemarker,这需要我使用以下命令为模板设置一个文件夹 cfg.setDirectoryForTemplateLoading(文件目录); 我创建了一个文件夹 /htmltemplates 我...

回答 2 投票 0

Scala3 不会在 Intellij 中显示类型不匹配或格式错误

我正在使用 Scala 3.3.1,Intellij 没有给我有用的构建错误输出,也没有错误突出显示。 例如,如果我的项目使用任何 3.x Scala SDK,并且我有以下错误代码,...

回答 1 投票 0

java.lang.ClassNotFoundException:构建 Freeplane 时的 org.freeplane.main.osgi.Activator

我使用 Java 11 在 IntelliJ IDE 上本地运行 Freeplane。重新启动 IDE 并运行 Freeplane 后,我现在收到此错误: 导致:java.lang.ClassNotFoundException:org.freeplane.main.osgi。

回答 1 投票 0

IntelliJ 拆分窗口导航

如果我将编辑器窗口(水平或垂直)分成 N 个选项卡组,如何通过键盘从一个选项卡组切换/切换到另一个选项卡组?如果所有选项卡都在同一组中,您可以切换...

回答 5 投票 0

如何在Spring6源码中创建新模块?

如标题所说,我想在Spring-Project中新建一个模块来调试源码来学习。 所以我创建一个名为 spring-z-simple 的新模块,如下所示 IDEA截图 这是我的毕业...

回答 1 投票 0

哪种 JetBrains IDE 更适合 Node.js? [已关闭]

我目前正在使用 IntelliJ IDEA,但我正在考虑转向 WebStorm。 根据您的经验,哪种更适合 Node.js 开发?

回答 1 投票 0

在配置了检查器框架的 Intellij 和 maven pom 中运行测试时出现 ClassNotFoundException

我正在尝试在 Intellij 中运行单元测试,甚至在它有机会运行之前我就遇到了以下构建失败: java: java.lang.ClassNotFoundException: org.checkerframework.checker.nullness.

回答 1 投票 0

Java | Maven| IntelliJ |蔚蓝宇宙|构建和运行失败

我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 ===========启动1.POM.xml====================== 我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 ============开始1.POM.xml======================== <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.beginsecure</groupId> <artifactId>CosmosUtility</artifactId> <version>1.0-SNAPSHOT</version> <properties> <maven.compiler.source>20</maven.compiler.source> <maven.compiler.target>20</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>com.azure</groupId> <artifactId>azure-sdk-bom</artifactId> <version>1.2.23</version> <type>pom</type> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>com.azure</groupId> <artifactId>azure-identity</artifactId> <version>1.12.0</version> </dependency> <dependency> <groupId>com.azure</groupId> <artifactId>azure-cosmos</artifactId> <version>4.58.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.32</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>20240303</version> </dependency> </dependencies> </project> ============结束1.POM.xml======================== ============启动2.CosmosHelper.java==================== package com.beginsecure; import com.azure.identity.ChainedTokenCredential; import com.azure.identity.DefaultAzureCredential; import com.azure.identity.ManagedIdentityCredential; import com.azure.core.credential.TokenCredential; import com.azure.cosmos.*; import com.azure.cosmos.CosmosClient; import com.azure.identity.DefaultAzureCredentialBuilder; public class CosmosHelper { private CosmosAsyncClient client; private String databaseName; public CosmosHelper(String cosmosEndPoint, String managedIdentity, String dbName) { System.out.printf(dbName); DefaultAzureCredential defaultCredential = new DefaultAzureCredentialBuilder() .managedIdentityClientId(managedIdentity) .build(); this.client = new CosmosClientBuilder() .endpoint(cosmosEndPoint) .credential(defaultCredential) .buildAsyncClient(); this.databaseName = dbName; } } ============结束2.CosmosHelper.java==================== ============启动3.main.java============================ package com.beginsecure; // Press Shift twice to open the Search Everywhere dialog and type `show whitespaces`, // then press Enter. You can now see whitespace characters in your code. public class Main { public static void main(String[] args) { // Press Alt+Enter with your caret at the highlighted text to see how // IntelliJ IDEA suggests fixing it. System.out.printf("Hello and welcome!"); CosmosHelper tst=new CosmosHelper("https://testdb.documents.azure.com:443/","<Synapse-Work-Space-Identity>","ToDoList"); // Press Shift+F10 or click the green arrow button in the gutter to run the code. for (int i = 1; i <= 5; i++) { // Press Shift+F9 to start debugging your code. We have set one breakpoint // for you, but you can always add more by pressing Ctrl+F8. System.out.println("i = " + i); } } } ============ 3.main.java结束============================ 使用 IntelliJ maven 运行上述项目文件时,Java 代码出现以下错误 java:com.azure.cosmos 包不存在 它应该成功运行,没有错误。 我同意你的观点,必须安装并重新加载特定 SDK 支持的所有模块才能与 Azure Cosmos DB 一起使用。 我正在尝试连接 Azure Cosmos 并尝试检索数据,但由于以下问题(编译时间)而失败。 下面是连接 Azure Cosmos DB 并从 Cosmos DB 检索数据的另一种方法。它使用 query 检索数据,如下面的输出所示。确保某些软件包及其版本在pom.xml中是否可用。 public static void main(String[] args) { CosmosClientBuilder clientBuilder = new CosmosClientBuilder() .endpoint(ENDPOINT) .key(KEY); CosmosClient cosmosClient = clientBuilder.buildClient(); CosmosDatabase cosmosDatabase = cosmosClient.getDatabase(DATABASE_NAME); CosmosContainer cosmosContainer = cosmosDatabase.getContainer(CONTAINER_NAME); String query = "SELECT * FROM c"; CosmosQueryRequestOptions options = new CosmosQueryRequestOptions(); options.setQueryMetricsEnabled(true); cosmosContainer.queryItems(query, options, CosmosItemProperties.class) .byPage() .flatMap(cosmosItemFeedResponse -> cosmosItemFeedResponse.getResults().stream()) .forEach(cosmosItemProperties -> { System.out.println(cosmosItemProperties.toJson()); }); cosmosClient.close(); } 输出: { "id": "1", "name": "Sai", "age": 10, "class": "7th", }, { "id": "2", "name": "Pavan", "age": 15, "class": "10th", }, { "id": "3", "name": "Balaji", "age": 13, "class": "8th", }

回答 1 投票 0

如何让“迁移到 JUnit 5”选项出现在 Intellij IDEA 中?

根据这些发行说明,Intellij 2017.3 及更高版本应该具有一个功能,可以轻松从 JUnit 4 迁移到 JUnit 5(又名 JUnit Jupiter)。 然而,这并没有出现在我身上。哈...

回答 2 投票 0

intelliJ -> 有什么方法可以将搜索范围限制在函数内

在编码时,我经常需要搜索在整个大文件中常见且出现的关键字,但我正在寻找函数中的实例。 通常默认的搜索功能

回答 4 投票 0

如何阻止 intellij-idea 删除文件中文本行末尾的空格?

我正在使用intellij编辑器2018.1.5社区版来编辑纯文本文件。 我没有使用项目。我在 Linux 上启动它,如下所示: idea.sh my_file.mpl 其中 my_file.mpl 是普通的...

回答 6 投票 0

© www.soinside.com 2019 - 2024. All rights reserved.