intellij-idea

Run Jest test in IntelliJ IDEA

杀马特。学长 韩版系。学妹 提交于 2021-01-28 06:41:08
问题 I created a React app with create-react-app version 1.4.0 and opened the resulting project in IntelliJ. Now I am attempting to run the generated test in IntelliJ as well. I get the following output when I do so: /usr/bin/node /home/l/src/hello-react/node_modules/jest/bin/jest --config {\"rootDir\":\"/home/l/src/hello-react\",\"transformIgnorePatterns\":[\"/node_modules/\",\"^/home/l/bin/idea-IU-172.3544.35/plugins/JavaScriptLanguage/helpers\"],\"unmockedModulePathPatterns\":[\"^/home/l/bin

IntelliJ Idea GUI Forms: Null Layout

陌路散爱 提交于 2021-01-28 02:03:31
问题 Hey all, I'm migrating from Netbeans to IntelliJ. Now I'm trying to create a GUI form, and, unlike Netbeans, IntelliJ doesn't let you use a "Null Layout". Is there any way to put JComponents inside of a JFrame without using some wierd layout? Sorry if I'm using incorrect terminology--hope you understand my question :) 回答1: If you want null layout in IDEA (which is not recommended anyway), you can use the JFormDesigner. 来源: https://stackoverflow.com/questions/6092727/intellij-idea-gui-forms

Why does Intellij IDEA say that used properties are unused?

寵の児 提交于 2021-01-28 00:01:46
问题 I have a properties file in my Java maven project. I have one class which loads these properties and stores them as constants. //Constants.java file has this code. Properties properties = new Properties(blah...); String username = properties.getProperty("my.username"); System.out.println(username); Despite using my.username property and the username variable, Intellij IDEA says that it is unused. Why ? I tried to invalidate caches and restart the IDE, but it did not change anything. As a

Error creating bean with name 'requestMappingHandlerMapping' - SpringBoot

陌路散爱 提交于 2021-01-27 19:40:50
问题 I am getting the following error at runtime. Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Ambiguous mapping.

Deploying embedded tomcat enabled spring-boot app using IntelliJ

狂风中的少年 提交于 2021-01-27 15:01:30
问题 I have a spring-boot based application, using embedded tomcat. I have no problem when deploying via mvn spring-boot:run goal, but I have a problems when I try to deploy using intelliJ spring-boot plugins. Important note, we have modified the default pom, turning our app into a war that could be deployed into a full tomcatTraditional Deployment, but this in development mode will be better to just deploy the app using the embedded tomcat. The problem is that basically we ended with this message

Deploying embedded tomcat enabled spring-boot app using IntelliJ

北城余情 提交于 2021-01-27 14:34:51
问题 I have a spring-boot based application, using embedded tomcat. I have no problem when deploying via mvn spring-boot:run goal, but I have a problems when I try to deploy using intelliJ spring-boot plugins. Important note, we have modified the default pom, turning our app into a war that could be deployed into a full tomcatTraditional Deployment, but this in development mode will be better to just deploy the app using the embedded tomcat. The problem is that basically we ended with this message

IntelliJ 2017.1.2 GOLANG debug does not work on breakpoints in packages

十年热恋 提交于 2021-01-27 13:27:07
问题 My application is made up of one main.go file and a handful of packages. When hitting breakpoints within the main.go, IntelliJ works as expected, showing variable values etc., however, when a breakpoint is set in a different package - aside from it being hit, no variables are shown and step over/in features do not work as expected (ignored when hit). Has anyone run into this issue and if so is there a workaround? 来源: https://stackoverflow.com/questions/43851853/intellij-2017-1-2-golang-debug

intellij idea gradle plugin unable to use relative paths specified in gradle.properties

妖精的绣舞 提交于 2021-01-27 12:50:05
问题 I have a Gradle project perfectly running (from the command line), configured to use a JDK specified with a relative path. For this, I added a gradle.properties file to my project, containing: org.gradle.java.home = jdk/ But when I try to run the build from Intellij Idea (14.0.3), I get: Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory: jdk/ Using absolute paths solves the issue. Do I misuse the gradle.properties or I just have to report a bug to Jetbrains, related

How to make available “open this project in IntelliJ IDEA” option in Windows context menu, if IntelliJ IDEA has been installed via JetBrains Toolbox?

血红的双手。 提交于 2021-01-27 12:46:07
问题 If to install some of IntelliJ IDEA family IDE manually, it will be suggested "add 'open this directory in IntellIJ IDEA' in context menu" in installation master. However, if to install IDE via JetBrains Toolbox there will not be available this option. 回答1: https://youtrack.jetbrains.com/issue/TBX-2478 -- watch this ticket (star/vote/comment) to get notified on any progress. Other tickets with similar requests (that I think should be marked as Duplicate to the aforementioned one or some other

Gradle - one project, multiple packages, multiple jars

佐手、 提交于 2021-01-27 10:30:31
问题 I'm asking you about a very basic question but I hope you can find the time to help me: I'm trying to realise a java-project, that can spit out several different programs which partially have dependencies on other projects of mine. In order to keep it simple, I want to have all the code in one project, run by Gradle, so if I make changes to a central library (the database connector for example) all the child-programs automatically recieve the changes. An example could look like this: project: