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,请不要使用此标记。

如何在 IntelliJ IDEA 中更改 Markdown 预览字体大小?

如何更改 IntelliJ IDEA 2017.1 中的 Markdown 预览字体大小?默认字体太小了,没什么用。 我尝试过改变: 首选项 > 编辑器 > 颜色和字体 > 字体...

回答 4 投票 0

在 IntelliJ 中创建 Java 类时:是否有向导/菜单来选择要扩展的包和类?

我喜欢 Eclipse 的功能之一是,在创建 Java 类时,可以使用向导来为类指定不同的属性。就像它的包,从...等扩展的类(参见下面...

回答 4 投票 0

我在将 Selenium 作为外部库导入/添加到我的 (Intelij) JavaFX 项目时遇到问题

我正在尝试在使用 JAVA 开发的 Web 自动化软件中使用 selenium,以下是我尝试使用 Intelij 作为代码编辑器执行的代码片段: 公开课妈...

回答 1 投票 0

如何解决问题:将数据填充到 H2 数据库时“类型“BINARY(255)”和“CHARACTER VARYING(255)”的值不可比较”?

在使用以下提供的技术处理 Java 项目时: 11 UTF-8 在使用以下技术进行Java项目时: <properties> <java.version>11</java.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <!-- Spring Boot Starter Web for building web, including RESTful, applications using Spring MVC --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- Spring Boot Starter Data JPA for Spring Data JPA and Hibernate --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> <!--<version>2.7.18</version>--> </dependency> <!-- Spring Boot Starter Test for testing Spring Boot applications --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <!-- H2 Database for in-memory database (for testing purposes) --> <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>2.1.214</version> <!--Values of types "BINARY(255)" and "CHARACTER VARYING(255)" are not comparable--> <scope>runtime</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.24</version> </dependency> <!-- Jackson for JSON processing --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> </dependencies> <build> <plugins> <!-- Spring Boot Maven Plugin for packaging Spring Boot applications --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> <!-- Lombok Maven Plugin for delombok process --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.24</version> </path> </annotationProcessorPaths> </configuration> </plugin> </plugins> </build> application.properties文件是: spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= spring.h2.console.enabled=true spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.hibernate.ddl-auto=update spring.sql.init.mode=always spring.sql.init.schema-locations=classpath:schema.sql spring.sql.init.data-locations=classpath:import.sql server.port=8081 spring.jpa.show-sql=true logging.level.org.hibernate.SQL=DEBUG logging.level.org.hibernate.type.descriptor.sql=TRACE spring.h2.console.path=/h2-console 我正在收到runtime error,例如: Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Values of types "BINARY(255)" and "CHARACTER VARYING(255)" are not comparable; SQL statement: alter table backlog_item_tasks add constraint FKigou96u26bqhftbug6ba1akfa foreign key (tasks_id) references task [90110-214] ... Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Values of types "BINARY(255)" and "CHARACTER VARYING(255)" are not comparable; SQL statement: alter table backlog_item_tasks add constraint FK1jlaqd1fh1t60yjn2mu179ra1 foreign key (backlog_item_id) references backlog_item [90110-214] ... Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Values of types "BINARY(255)" and "CHARACTER VARYING(255)" are not comparable; SQL statement: alter table estimation_log_entry add constraint FK4qne2wpk2c906qwlb0qt17k7s foreign key (task_id) references task [90110-214] 尝试过: 我正在尝试通过预先准备的h2脚本填充SQL数据库所需的数据,例如,import.sql(DML script): INSERT INTO backlog (id, name, description) VALUES ('uuid-1', 'Backlog 1', 'Description for backlog 1'); INSERT INTO backlog_item (id, status, story, story_points, summary, type, product_id, release_id, sprint_id, backlog_id) VALUES ('uuid-2', 'Open', 'Story 1', 5, 'Summary for story 1', 'Feature', 'uuid-product', 'uuid-release', 'uuid-sprint', 'uuid-1'); INSERT INTO task (id, name, description, hours_remaining, volunteer, backlog_item_id) VALUES ('uuid-3', 'Task 1', 'Description for task 1', 10, 'Volunteer 1', 'uuid-2'); ,相应地,schema.sql (DDL script): CREATE TABLE backlog ( id VARCHAR(255) PRIMARY KEY, name VARCHAR(255) NOT NULL, description TEXT ); CREATE TABLE backlog_item ( id VARCHAR(255) PRIMARY KEY, status VARCHAR(255), story TEXT, story_points INT, summary TEXT, type VARCHAR(255), product_id VARCHAR(255), release_id VARCHAR(255), sprint_id VARCHAR(255), backlog_id VARCHAR(255), FOREIGN KEY (backlog_id) REFERENCES backlog (id) ); CREATE TABLE task ( id VARCHAR(255) PRIMARY KEY, name VARCHAR(255) NOT NULL, description TEXT, hours_remaining INT, volunteer VARCHAR(255), backlog_item_id VARCHAR(255), FOREIGN KEY (backlog_item_id) REFERENCES backlog_item (id) ); 将 application.properties 配置为: 1. Simple In-Memory Database spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE 上面提供的模式是通过http://localhost:8081/h2-console/显示仅在浏览器中。 和: 3. Persistent Database in File spring.datasource.url=jdbc:h2:file:./data/mydb` 复制中间体runtime errors如下: Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported database file version or invalid file header in file "E:/IdeaProject/PDP1/data/mydb.mv.db" [90048-214] ... Caused by: org.h2.jdbc.JdbcSQLNonTransientConnectionException: Unsupported database file version or invalid file header in file "E:/IdeaProject/PDP1/data/mydb.mv.db" ... Caused by: org.h2.mvstore.MVStoreException: The write format 3 is larger than the supported format 2 [2.1.214/5] 预计: 我希望通过以下方式收到 H2 database 以及 IDEA (Intellij IDEA) 中的内容: 要解决问题: “类型“BINARY(255)”和“CHARACTER VARYING(255)”的值不是 可比” 将数据填充到 H2 数据库时,您应该: 将缺失的注释添加到需要这些字段的simple data fields,如: @Column(columnDefinition = "VARCHAR(255)") 并且(如果您需要根据要求,表示关系的字段,如 @ManyToOne、@OneToOne 等): @JoinColumn(名称=“backlog_item_id”,columnDefinition = “VARCHAR(255)”) 升级H2依赖版本到最新版本,例如: <dependency> <groupId>com.h2database</groupId> <artifactId>h2</artifactId> <version>2.2.224</version> </dependency> 使用以下 application.properties 选项更新 jdbc:h2:file: jdbc:h2:文件:./data/testdb;DB_CLOSE_ON_EXIT=FALSE;AUTO_RECONNECT=TRUE

回答 1 投票 0

找回丢失的货架变化

我已经通过 Intellij Idea 2016.2.1 搁置了 26 个 java 文件更改,并签出到不同的分支。 当我来到旧分支检查我搁置的更改时。 我现在疯了,我丢失了所有文件......

回答 6 投票 0

IntelliJ - 首次运行后从旧版本导入配置

我最近安装了 IntelliJ IDEA 2017.2 版本。我想保留旧 2017.1 版本的设置。 IntelliJ 的支持站点显示了应该显示的以下对话框...

回答 3 投票 0

IntelliJ IDEA 中的书签

Eclipse 有一项称为“书签”的功能,可以在其中针对特定代码行做笔记,还可以使用“视图”来查看所有这些书签。 IntelliJ IDEA 本身有类似的东西吗?或者...

回答 1 投票 0

Android SDK/Maven 配置问题

我正在尝试编译一个android项目以使用maven生成一个.apk(我没有使用Android Studio,我正在使用IntelliJ idea) 1-我已经下载了这个行命令工具,我猜它是SDK M...

回答 1 投票 0

Intellij 中文件名的黄色背景是什么意思?

我认为这可能与异步任务有关,但我不确定。有人可以帮我澄清一下吗? 另外调试时黄色框是什么意思?

回答 6 投票 0

如何在 IntelliJ IDEA 中查看传入的提交,类似于 VS Code

在 VS Code 中,在左侧的源代码管理视图中,您可以看到按提交分组的传入更改。您可以探索提交、查看更改的文件并检查各个更改。 在IntelliJ IDEA中,似乎...

回答 1 投票 0

如何开始在 IntelliJ IDEA 中使用调试器

我正在从 VS Code 切换,但在启动调试器时遇到问题。 我单击 npm 脚本旁边的绿色播放按钮,然后按下调试器选项。德...

回答 1 投票 0

IntelliJ 自动构建有错误,但编辑器中没有错误

我正在使用 IntelliJ IDEA Ultimate 2019.2 来处理 Java w/gradle 项目。 当我尝试运行 JUnit 测试时,会触发自动构建,并发出以下消息: 自动构建完成...

回答 1 投票 0

将 Processing 4 添加到 Intelllji IDE

嗯,我已经下载了 Proccesing 4 zip,并解压了它。现在我将 core.jar 库添加到我的项目中,但它似乎弄乱了一些库,“gluegen”和“jogl&...

回答 1 投票 0

如何在 Intellij IDEA 中配置删除行注释和文本之间的空格?

如果我想注释行,我使用“Ctrl+/”并在行首获取“//” 然后我使用“Ctrl+alt+L”键自动格式化并得到 最后我必须手动删除“//”和文本之间的空格...

回答 4 投票 0

IntelliJ 代码覆盖率:如何知道哪些单元测试覆盖了源代码中的行

我对 IntelliJ 的这个很棒的功能还很陌生。当我运行代码覆盖率时,我可以在 IDE 中看到绿色标记表示该行已被覆盖,红色标记表示该行未被覆盖...

回答 1 投票 0

Mac 中的 Maven 构建失败 - 无法将工件从/转移到中央(https://repo.maven.apache.org/maven2):管道和“parent.relativePath”损坏

自从过去几天以来我一直在解决这个问题。尝试开发一个简单的 Maven 应用程序。但我的 mac M1 发生了一些事情。 当我运行构建时,它失败并出现以下问题。 从

回答 1 投票 0

Intellij IDEA 不使用自定义 gradle 用户主页

我在idea Ultimate 2024.1.2(MacOS作为系统)中对gradle进行了配置: 你怎么看 - 我已经覆盖了 gradle 用户主页的路径。但当我

回答 2 投票 0

为什么 jupiter 测试在一个 IntelliJ IDEA 项目中有效,而在另一个项目中不起作用

我正在 Intellij IDEA 中做学生作业“task3”,发现教授给我们发送了一个新的测试文件。我是从大学网站下载的。 我用新的

回答 1 投票 0

无法在 IDEA 和 Kotlin 1.7.0 中访问 'kotlin.ranges.OpenEndRange'

我有一个使用 Kotlin 1.7.0 的 Kotlin + Maven 项目。当我在 IDEA 中导入项目时,当与 IntRange 一起使用时,我在 in 运算符中看到一个“错误”(稍后会详细介绍): 我的 IDEA 版本是

回答 1 投票 0

这是员工域,是吗?

Lorem ipsum dolor sat amet,consectetur adipiscing elit。 sed sed eros condimentum,tincidunt urna ac,iaculis velit。 Duis neque totortor,tempus a arcu pharetra,maximus faucibuserat。 Nulla facilisi。

回答 1 投票 0

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