我已经下载了时区数据库库,并试图在 Windows 下将其编译为 DLL。当我这样做时,我收到如下消息:
1>c:\javatools\tzinfo\src\private.h(97): 致命错误 C1083: 无法打开包含文件: 'sys/wait.h': 没有那个文件或目录
当然,sys/wait.h 不是 ANSI C,这是问题所在。我似乎记得 Windows 有一些接近的文件名。我可以在这里得到帮助吗?
谢谢。
我听说过一些我无法与之交谈的人是jmock的忠实粉丝.我已经完成了以测试为中心的开发多年,因此我浏览了网站并查看了一些文档,但仍然无法弄清楚它有多好.
春天我遇到了同样的问题.如果你已经明白它是什么,那么他们的文档会很好地解释它,所以我不认为jmock是没有价值的.我只是不明白它对我有什么影响.
因此,如果jmock为我提供了模拟存根数据的能力,那么让我们举一个如何做事情的例子,看看jmock会更好.
假设我有我的UI层,在创建窗口小部件时创建窗口小部件和窗口小部件服务,初始化窗口小部件并将其中的部分存储在构成窗口小部件所需的三个表中.
当我写测试时,我就是这样做的.
首先,我重新将hibernate指向我的测试高超音速数据库,这样我就不需要做一堆数据库设置了.Hibernate为我创建了我的表.
我的所有测试都有静态工厂方法,为我构建类的测试实例.我的每个DAO都创建指向测试模式的测试版本.然后我的服务类有一个用测试类生成的DAO构造自己的服务类.
现在,当我运行调用服务的UI控制器的测试时,我正在通过应用程序测试我的代码.当然,这不是进行单元测试时通常需要的完全隔离,但在我看来,它为我提供了更好的单元测试,因为它在所有支持层中一直执行实际代码.
因为在休眠状态下Hypersonic运行缓慢,所以我的所有测试都需要稍长的时间,但我的整个构建仍然在不到五分钟的时间内在较旧的计算机上运行以进行完整的构建和打包,所以我觉得这很可接受.
我如何用jmock做不同的事情?
我有一个这样的注释:
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.TYPE})
public @interface MyAnnotation {
String name();
Class<InstanceConverter> converter();
Run Code Online (Sandbox Code Playgroud)
我要做的是使名称和转换器可选.看来默认情况下需要注释的所有属性.如何使转换器可选?
我已经阅读了两篇关于注释的文章,似乎没有提到可选属性.
谢谢.
我有一个简单的返回类,它接受异常或我们的业务对象之一.如果REST Web服务方法抛出异常,它会捕获它并在响应中设置异常.如果没有,它会在响应中设置返回值并将其序列化.
在我的情况下,我得到一个InvocationTargetError,它包装了我们的一个服务异常.我在我的返回类的异常上设置了这个并得到以下堆栈跟踪:
java.lang.StackOverflowError
com.google.gson.reflect.TypeToken.hashCode(TypeToken.java:280)
java.util.HashMap.get(HashMap.java:300)
java.util.Collections$SynchronizedMap.get(Collections.java:1975)
com.google.gson.Gson.getAdapter(Gson.java:337)
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:55)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:68)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.write(ReflectiveTypeAdapterFactory.java:89)
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.write(ReflectiveTypeAdapterFactory.java:195)
and so on...
Run Code Online (Sandbox Code Playgroud)
有人有主意吗?这看起来像是Gson 2.2.2中的一个错误.
I have a spring boot application being built with Gradle. This project has been sitting for a bit and I'm now resurrecting it and updating all of the versions and I've run into an issue when running my application from inside intelliJ.
Here is my complete stack trace per request.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: …
Run Code Online (Sandbox Code Playgroud) 我真的很喜欢c ++中sprintf给出的答案?但它仍然不是我想要的.
我想用占位符创建一个常量字符串,比如
const std::string LOGIN_URL = "%s://%s/chronicle/spring/api/logout";
Run Code Online (Sandbox Code Playgroud)
然后使用可替换参数构建字符串,如:
sprintf(url, LOGIN_URL, protocol, server); //coding sprintf from long ago memory, please ignore
Run Code Online (Sandbox Code Playgroud)
但是如果我能帮忙的话,我真的想远离C弦.
stringbuilder()方法要求我把我的常量字符串组合起来并在我想要使用它们时组装它们.这是一个很好的方法,但我想要的是更整洁.
我有一段时间没有下载弹簧.我正在调查gradle,但似乎还没有它,所以我想用java,Spring 4和ant创建一个新的spring框架项目.我似乎无法找到下载Spring 4二进制文件的地方.
他们只是在公共汽车下踢蚂蚁开发人员吗?
我在基于Tyrus的客户端和我的tomcat Web服务器之间使用websocket而没有压缩.我在tomcat端看到来自我的套接字的消息,但如果我设置一个wireshark来观看它们来到我的websocket客户端,我找不到我的消息的文本.
由于它们没有被压缩,因此它们必须以某种方式编码.谁能告诉我如何在wireshark中读取我的数据包?
在 IntelliJ-IDA 下使用 gradle 设置新的 Spring Boot 项目。我在此配置下运行 spock 测试时遇到问题。看来 spock 找不到我的单元测试。
这是堆栈跟踪:
/opt/java/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:43701,suspend=y,server=n -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/opt/idea-IU-222.3739.54/plugins/Groovy/lib/agent/gragent.jar -javaagent:/opt/idea-IU-222.3739.54/plugins/java/lib/rt/debugger-agent.jar -Dfile.encoding=UTF-8 -classpath /opt/idea-IU-222.3739.54/lib/idea_rt.jar:/opt/idea-IU-222.3739.54/plugins/junit/lib/junit5-rt.jar:/opt/idea-IU-222.3739.54/plugins/junit/lib/junit-rt.jar:/home/thomas/workspace/farragut-server/build/classes/java/test:/home/thomas/workspace/farragut-server/build/classes/java/main:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/2.7.3/9e36c7517c4f872b69d0665e1dd46bd6d83c43b7/spring-boot-starter-web-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-test/2.7.3/ce5a11117ac6c92d38ce071ff2273799862659b7/spring-boot-starter-test-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-jpa/2.7.3/23f7118584200cf9edd43140dc6252679047bee0/spring-boot-starter-data-jpa-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/2.7.3/6b0c093af667bf645cd5f49372e2a2540ae2855f/spring-boot-starter-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-devtools/2.7.3/ea46ce1fc8c0581f2455dcc43a11768660d87388/spring-boot-devtools-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-sql/3.0.9/a70eef193799ed892958ca00c6eda4f8710f656f/groovy-sql-3.0.9.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.spockframework/spock-core/2.1-groovy-3.0/2bd689be193cb26f42692eeef070e6669bebae3e/spock-core-2.1-groovy-3.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy/3.0.10/b92c72a758f468e64b55e38abe06afa873decdba/groovy-3.0.10.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/2.2/3f2bd07716a31c395e2837254f37f21f0f0ab24b/hamcrest-core-2.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-json/2.7.3/38c88404d68926aaf6c0914199e8c5e766946de2/spring-boot-starter-json-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/2.7.3/7a5998baaa05d5e7a9af7194a21f2ac3512ba7a0/spring-boot-starter-tomcat-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/5.3.22/519d86b7ac9b8b6bb54739eb4eb73dc13a263b28/spring-webmvc-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/5.3.22/fdab9b8d8df2e6a8fb90f2481c361bcf2c129567/spring-web-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test-autoconfigure/2.7.3/42924dceee5636b5c12ed36011cc333b40e1f756/spring-boot-test-autoconfigure-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-test/2.7.3/34d3fbf68aa72beef1515ab4a439c23c8c41280e/spring-boot-test-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-test/5.3.22/48375b44c82945e12012ec56dc4090c805b4508b/spring-test-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.3.22/661fc01832716c7eedebf995c6841b2f7117c63d/spring-core-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.jayway.jsonpath/json-path/2.7.0/f9d7d9659f2694e61142046ff8a216c047f263e8/json-path-2.7.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/jakarta.xml.bind/jakarta.xml.bind-api/2.3.3/48e3b9cfc10752fba3521d6511f4165bea951801/jakarta.xml.bind-api-2.3.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.assertj/assertj-core/3.22.0/c300c0c6a24559f35fa0bd3a5472dc1edcd0111e/assertj-core-3.22.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.2/1820c0968dba3a11a1b30669bb1f01978a91dedc/hamcrest-2.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter/5.8.2/5a817b1e63f1217e5c586090c45e681281f097ad/junit-jupiter-5.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-junit-jupiter/4.5.1/f81fb60bd69b3a6e5537ae23b883326f01632a61/mockito-junit-jupiter-4.5.1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.mockito/mockito-core/4.5.1/ed456e623e5afc6f4cee3ae58144e5c45f3b3bf/mockito-core-4.5.1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.skyscreamer/jsonassert/1.5.1/6d842d0faf4cf6725c509a5e5347d319ee0431c3/jsonassert-1.5.1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.xmlunit/xmlunit-core/2.9.0/8959725d90eecfee28acd7110e2bb8460285d876/xmlunit-core-2.9.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/2.7.3/b2806bdfae4cff6b82a174a68984a4cedd2d83f5/spring-boot-starter-aop-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/2.7.3/c5cfc6efad06811d5dd916e86c97989b08575b31/spring-boot-starter-jdbc-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-jpa/2.7.2/1b8783e98d4199c8fbcb46765fbfce02f41907fe/spring-data-jpa-2.7.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/jakarta.transaction/jakarta.transaction-api/1.3.3/c4179d48720a1e87202115fbed6089bdc4195405/jakarta.transaction-api-1.3.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/jakarta.persistence/jakarta.persistence-api/2.2.3/8f6ea5daedc614f07a3654a455660145286f024e/jakarta.persistence-api-2.2.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-core/5.6.10.Final/408fd5802391d8e6f619db9d7c6c0e27d49118c2/hibernate-core-5.6.10.Final.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aspects/5.3.22/1fdd8ac7f557ba12bb59086edfe3a9cdf6d918bf/spring-aspects-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/2.7.3/4c96169e8d71c9c41f07a40d011dbd41898180ac/spring-boot-autoconfigure-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/2.7.3/3a8d641077565b7eaec3b2f91d5b83a6800f5895/spring-boot-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/2.7.3/a1e4a13b656182ba10b4c0c7848f91cd6f854fdf/spring-boot-starter-logging-2.7.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/jakarta.annotation/jakarta.annotation-api/1.3.5/59eb84ee0d616332ff44aba065f3888cf002cd2d/jakarta.annotation-api-1.3.5.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.30/8fde7fe2586328ac3c68db92045e1c8759125000/snakeyaml-1.30.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-engine/1.8.2/b737de09f19864bd136805c84df7999a142fec29/junit-platform-engine-1.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jsr310/2.13.3/ad2f4c61aeb9e2a8bb5e4a3ed782cfddec52d972/jackson-datatype-jsr310-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.module/jackson-module-parameter-names/2.13.3/f71c4ecc1a403787c963f68bc619b78ce1d2687b/jackson-module-parameter-names-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.datatype/jackson-datatype-jdk8/2.13.3/d4884595d5aab5babdb00ddbd693b8fd36b5ec3c/jackson-datatype-jdk8-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.13.3/56deb9ea2c93a7a556b3afbedd616d342963464e/jackson-databind-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/9.0.65/bd70dfeb39cc83c6934be24fa377b21e541dbe76/tomcat-embed-websocket-9.0.65.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/9.0.65/a24c5f379b2ec343a167a83332b75c37f26b2ae7/tomcat-embed-core-9.0.65.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/9.0.65/d278157387e59a5f9b48091dcada22b7c74aed00/tomcat-embed-el-9.0.65.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/5.3.22/fdd59bb4795c7a399e95ec4a5c8b91103e3189fd/spring-context-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/5.3.22/2f9f00efbff8432f145ccffeb93e6a1819bac362/spring-aop-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/5.3.22/866c2022b5fef05b1702f4a07cfa5598660ce08a/spring-beans-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/5.3.22/c056f9e9994b18c95deead695f9471952d1f21d1/spring-expression-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jcl/5.3.22/811ace5e5eb379654ed96fd7844809db51af74a5/spring-jcl-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.36/6c62681a2f655b49963a5983b8b0950a6120ae14/slf4j-api-1.7.36.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/net.minidev/json-smart/2.4.8/7c62f5f72ab05eb54d40e2abf0360a2fe9ea477f/json-smart-2.4.8.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/jakarta.activation/jakarta.activation-api/1.2.2/99f53adba383cb1bf7c3862844488574b559621f/jakarta.activation-api-1.2.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-params/5.8.2/ddeafe92fc263f895bfb73ffeca7fd56e23c2cce/junit-jupiter-params-5.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-api/5.8.2/4c21029217adf07e4c0d0c5e192b6bf610c94bdc/junit-jupiter-api-5.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.12.13/35ffee9c24b1c68b08d9207e1a2d3da1add6166/byte-buddy-1.12.13.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.12.13/5a4ed1c2eb9e8d7272b36b2b16757e5c653ab650/byte-buddy-agent-1.12.13.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.vaadin.external.google/android-json/0.0.20131108.vaadin1/fa26d351fe62a6a17f5cda1287c1c6110dec413f/android-json-0.0.20131108.vaadin1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.9.7/158f5c255cd3e4408e795b79f7c3fbae9b53b7ca/aspectjweaver-1.9.7.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/5.3.22/d50fc708ef9bade1d3fb64d529b8ff8cd5b625ba/spring-jdbc-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.zaxxer/HikariCP/4.0.3/107cbdf0db6780a065f895ae9d8fbf3bb0e1c21f/HikariCP-4.0.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-orm/5.3.22/abcefbf4895a3daf263cf385cc66e924db92d254/spring-orm-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/2.7.2/9547d1234cb380234066aef60129bb2ddfdc6347/spring-data-commons-2.7.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/5.3.22/d0b3812ab20987a13f3a9ae7b4c54f619e034692/spring-tx-5.3.22.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/jaxb-runtime/2.3.6/1e6cd0e5d9f9919c8c8824fb4d310b09a978a60e/jaxb-runtime-2.3.6.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/5.1.2.Final/e59ffdbc6ad09eeb33507b39ffcf287679a498c8/hibernate-commons-annotations-5.1.2.Final.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.4.3.Final/c4bd7e12a745c0e7f6cf98c45cdcdf482fd827ea/jboss-logging-3.4.3.Final.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/antlr/antlr/2.7.7/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.jboss/jandex/2.4.2.Final/1e1c385990b258ff1a24c801e84aebbacf70eb39/jandex-2.4.2.Final.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.5.1/3fe0bed568c62df5e89f4f174c101eab25345b6c/classmate-1.5.1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.11/4741689214e9d1e8408b206506cbe76d1c6a7d60/logback-classic-1.2.11.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-to-slf4j/2.17.2/17dd0fae2747d9a28c67bc9534108823d2376b46/log4j-to-slf4j-2.17.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.36/ed46d81cef9c412a88caef405b58f93a678ff2ca/jul-to-slf4j-1.7.36.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-commons/1.8.2/32c8b8617c1342376fd5af2053da6410d8866861/junit-platform-commons-1.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.opentest4j/opentest4j/1.2.0/28c11eb91f9b6d8e200631d46e20a7f407f2a046/opentest4j-1.2.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apiguardian/apiguardian-api/1.1.2/a231e0d844d2721b0fa1b238006d15c6ded6842a/apiguardian-api-1.1.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.13.3/7198b3aac15285a49e218e08441c5f70af00fc51/jackson-annotations-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.13.3/a27014716e4421684416e5fa83d896ddb87002da/jackson-core-2.13.3.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/net.minidev/accessors-smart/2.4.8/6e1bee5a530caba91893604d6ab41d0edcecca9a/accessors-smart-2.4.8.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.glassfish.jaxb/txw2/2.3.6/45db7b69a8f1ec2c21eb7d4fc0ee729f53c1addc/txw2-2.3.6.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.sun.istack/istack-commons-runtime/3.0.12/cbbe1a62b0cc6c85972e99d52aaee350153dc530/istack-commons-runtime-3.0.12.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.2.11/a01230df5ca5c34540cdaa3ad5efb012f1f1f792/logback-core-1.2.11.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.17.2/f42d6afa111b4dec5d2aea0fe2197240749a4ea6/log4j-api-2.17.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.1/a99500cf6eea30535eeac6be73899d048f8d12a8/asm-9.1.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.h2database/h2/2.1.214/d5c2005c9e3279201e12d4776c948578b16bf8b2/h2-2.1.214.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.12.8/aa42edb39e624cbf8a5b33cb5c5e920027cee42b/byte-buddy-1.12.8.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.objenesis/objenesis/3.2/7fadf57620c8b8abdf7519533e5527367cb51f09/objenesis-3.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-testkit/1.8.2/43c593ad99a975588d56b501fd4353065facebfc/junit-platform-testkit-1.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/20.1.0/2fcd1f3225bca0c4a7bc931142076f8c1e80993f/annotations-20.1.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.2/81a03f76019c67362299c40e0ba13405f5467bff/asm-9.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/cglib/cglib-nodep/3.3.0/87271c95d5bc9e37e4981c9593ff14d470b6684b/cglib-nodep-3.3.0.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.jupiter/junit-jupiter-engine/5.8.2/c598b4328d2f397194d11df3b1648d68d7d990e3/junit-jupiter-engine-5.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/org.junit.platform/junit-platform-launcher/1.8.2/c334fcee82b81311ab5c426ec2d52d467c8d0b28/junit-platform-launcher-1.8.2.jar:/home/thomas/.gradle/caches/modules-2/files-2.1/com.sun.activation/jakarta.activation/1.2.2/74548703f9851017ce2f556066659438019e7eb5/jakarta.activation-1.2.2.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 com.heavyweightsoftware.farragut.server.pojo.account.AccountTest
Connected to the target VM, address: '127.0.0.1:43701', transport: 'socket'
Internal Error occurred.
org.junit.platform.commons.JUnitException: TestEngine with ID 'spock' failed to discover tests
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:160)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:134)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:80)
at org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:110)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:57)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: org.junit.platform.commons.JUnitException: ClassSelector [className …
Run Code Online (Sandbox Code Playgroud) 我最近升级到 IntelliJ 2023.3,现在当我按 Ctrl Alt T 创建测试时,测试库列表包括 junits 和 Test NG,但没有 spock。我仍然可以运行现有的 Spock 测试,但它不允许我创建新的测试。
回顾了 spock 的 IntelliJ 设置,但没有看到任何我应该尝试的内容。
不知道接下来要尝试什么。
请帮忙!如果没有单元测试,我就无法再编写代码。:)