标签: spring-tool-suite

如何在 STS 上停止循环过程“发送类路径通知”

我在 Window 10 Home 中使用 STS 4.3.1 RELEASE。
当我在 java 或 jsp 文件中使用自动复杂化时,它突然工作缓慢。(我的 STS 最小/最大内存 3000M)

在进度选项卡中,“Send Classpath Notifications”过程已经说明并且很快就会增加很多。
然后STS很快就性能明显变慢了,然后一直“没有反应”(有白色状态)

在此处输入图片说明

事实上,在 4.2 或低于其他版本的 STS 中,我没有遇到这个问题。

java eclipse spring-tool-suite

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

如何调试grails命令

当我运行dbm-generate-changelog时抛出异常.我想调试这个脚本,但我无法想象如何做到这一点.我试图将断点放到脚本文件中_DatabaseMigrationCommon.groovy,然后在eclipse中创建新"debug configuraion"命令.当我运行时,没有任何断点暂停执行.我也尝试过--debug参数.

setup:
Grails: 2.3.3
GGTS: 3.4
Eclipse: 4.3
Run Code Online (Sandbox Code Playgroud)

eclipse grails groovy gant spring-tool-suite

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

Spring Tool Suite仅在延迟十秒后标记出现

我正在运行STS(Kepler/3.5.1.RELEASE)并遇到一个恼人的问题,其中Java编辑器将突出显示变量/方法/等的出现.只有在十秒钟的延迟之后.

无论以下情况如何,这种行为似乎都会发生:

  • 在"标记出现次数"设置中选择的验证类型数
  • 选择的项目验证器数量
  • 或我选择的发生类型的数量

在同一台机器上安装类似大小的Eclipse Juno安装几乎可以即时发生.正如我所料,其他编辑器类型(例如Python)似乎更快地突出显示.

有没有人见过这种行为?

eclipse sts-springsourcetoolsuite spring-tool-suite

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

Spring Tool Suite - Pivotal tc Server Developer Edition v3.0所需的端口8080已在使用中

在Spring Tool Suite中运行代码时出现以下错误.

.................................................. ............................

Pivotal tc Server Developer Edition v3.0所需的端口8080已在使用中.服务器可能已在另一个进程中运行,或者系统进程可能正在使用该端口.要启动此服务器,您需要停止其他进程或更改端口号.

.................................................. ............................

以下是错误的屏幕截图. Error-Spring工具套件

另外,下面是我在localhost上获得的:8080

本地主机:8080

通过更改server.xml(即<Connector acceptCount="100" connectionTimeout="20000" executor="tomcatThreadPool" maxKeepAliveRequests="15" port="${bio.https.port}" protocol="org.apache.coyote.http11.Http11Protocol" redirectPort="${bio.https.port}"/> )中的端口号,我得到了不同端口号的相同错误.

java spring-mvc spring-tool-suite

9
推荐指数
3
解决办法
3万
查看次数

Lombok和STS问题 - 方法未定义

我的STS版本为3.6.3.SR1,它基于Eclipse Luna 4.4.1.

我做了以下步骤:

1)下载并运行lombak可运行的jar并给出了我的STS的路径.2)我验证了vmargs的条目,但是缺少Xbootclasspath并将其添加到有,

-vmargs
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xms512m
-Xmx1024m
-javaagent:C:\tools\Lombok\lombok.jar
-Xbootclasspath/a:C:\tools\Lombok\lombok.jar
Run Code Online (Sandbox Code Playgroud)

3)我有退出并从快捷方式以及STS.exe的absoulte位置打开STS

4)我验证了用@Data和其他lombak注释注释的java类的大纲.我可以看到生成的getter和setter.甚至自动辅助也会显示该方法.

5)我做了Maven - > Update Project甚至做了一个Project Clean

6)确认已从关于帮助中的STS安装了lombak.

即使在上述所有活动之后,仍有许多编译器问题在所有@Data或@Getter或@Setter注释上抱怨未定义的方法getXXX()和setXXX().

Maven构建运行成功,运行时行为很好,因为编译的类似乎有getter和setter.

Intelli J似乎没有这个问题,因为其他开发人员可以使用该库.

我的pom也有以下条目:

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.16.4</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

PS:我在STS之上下载了Eclipse Kepler,以启用JBoss Fuse Tooling.

eclipse lombok spring-tool-suite eclipse-luna

9
推荐指数
3
解决办法
2万
查看次数

无法将mysql连接到spring启动项目

我按照这个https://spring.io/guides/gs/accessing-data-mysql/指南将mysql数据库连接到spring启动项目

但是在运行应用程序时遇到以下错误,我正在生成spring starter项目,只在通过spring工具套件创建项目时选择web,mysql和jpa框

2018-03-28 16:48:42.125 ERROR 15452 --- [           main] com.zaxxer.hikari.HikariConfig           : Failed to load driver class com.mysql.jdbc.Driver from HikariConfig class classloader jdk.internal.loader.ClassLoaders$AppClassLoader@782830e
2018-03-28 16:48:42.128  WARN 15452 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed …
Run Code Online (Sandbox Code Playgroud)

mysql spring spring-data-jpa spring-tool-suite spring-boot

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

Spring应用程序返回空JSON

我开始阅读"学习Spring Boot 2.0 - 第二版:简化基于微服务和反应式编程的快速闪存应用程序的开发",并且遇到了第一个示例程序之一的问题.

当我http://localhost:8080/chapters对它进行GET 返回时:

[
    {},
    {},
    {}
]
Run Code Online (Sandbox Code Playgroud)

代替:

[
    {"id": 1,
     "name": "Quick Start with Java"},
    {"id":,
     "name": "Reactive Web with Spring Boot"},
    {"id": 3,
     "name": ... and more!"}
]
Run Code Online (Sandbox Code Playgroud)

这是我的代码(减去进口):

@Data
@Document
public class Chapter {

    @Id
    private String id;
    private String name;

    public Chapter(String name) {
        this.name = name;
    }
}


public interface ChapterRepository extends ReactiveCrudRepository<Chapter, String>{
}

@Configuration
public class LoadDatabase {

@Bean
CommandLineRunner init(ChapterRepository repository) {
    return args -> …
Run Code Online (Sandbox Code Playgroud)

java eclipse spring spring-tool-suite spring-boot

9
推荐指数
2
解决办法
1283
查看次数

安装 Spring 工具套件

我正在尝试安装 Spring 工具套件。

当我从https://spring.io/tools#suite- Three 下载它时,它给出了一个像 spring-tool-suite-4-4.8.1.RELEASE-e4.17.0-win32.win32.x86_64 这样的 .jar 文件。自解压.jar

我如何安装它并使用它,之前我使用它从 spring wb 站点获取 .zip 文件。

spring-tool-suite

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

NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()

在 Spring Tool Suite (4.20.0) 中运行 JUnit 测试时出现此错误。

测试运行正常,但最后抛出此错误 -

java.lang.NoSuchMethodError: 'java.util.Set org.junit.platform.engine.TestDescriptor.getAncestors()'
at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.getTestClassNames(StackTracePruningEngineExecutionListener.java:50)
at org.junit.platform.launcher.core.StackTracePruningEngineExecutionListener.executionFinished(StackTracePruningEngineExecutionListener.java:39)
at org.junit.platform.launcher.core.DelegatingEngineExecutionListener.executionFinished(DelegatingEngineExecutionListener.java:46)
at org.junit.platform.launcher.core.OutcomeDelayingEngineExecutionListener.reportEngineFailure(OutcomeDelayingEngineExecutionListener.java:83)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:203)
Run Code Online (Sandbox Code Playgroud)

这是我的 Gradle 插件部分 -

plugins {
    id 'java'
    id 'eclipse'
    id 'eclipse-wtp'
    id 'org.springframework.boot' version "3.1.4"
    id 'io.spring.dependency-management' version "1.1.3"
}
Run Code Online (Sandbox Code Playgroud)

这是我的 Gradle 依赖项部分 -

implementation("org.springframework.boot:spring-boot-starter-parent:3.1.4")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter-test")
Run Code Online (Sandbox Code Playgroud)

我究竟做错了什么?

我的测试课非常基础 -

@ExtendWith(SpringExtension.class)
@ContextConfiguration(initializers = ConfigDataApplicationContextInitializer.class, classes = { TransformService.class})
@Slf4j
public class TransformServiceTest {

    @Autowired
    TransformService transformService;

    @Test
    public void transformXmlTest() throws Exception {
        transformService.transformXml();
    } …
Run Code Online (Sandbox Code Playgroud)

junit spring-tool-suite spring-boot spring-tools-4

9
推荐指数
2
解决办法
9392
查看次数

JUnit启动时间很慢

我正在开发一个相当小的项目(就依赖性而言),每当我运行单元测试时,JVM加载需要8秒,然后以0.2秒运行实际测试.

我的环境:

  • Java 8
  • Spring Tool Suite 3.8.1.RELEASE
  • JUnit 4
  • Windows 8

我担心在我的环境中肯定会有这样的事情导致这种情况持续这么长时间,我希望有人之前已经看过这个问题并找到问题的根源并且可能是一个解决方案?例如,如果我的PATH环境变量真的很长,那会有关系吗?当我进行JUnit测试时到底发生了什么?

我正在尝试运行的实际测试是:

public class TemplateLocationCalculatorTest {

    private TemplateLocationCalculator target = new TemplateLocationCalculator();

    @Test
    public void whenGivenRootReturnIndex(){
        Assert.assertEquals("index", target.calculate("/"));
    }
}
Run Code Online (Sandbox Code Playgroud)

目标类是:

public class TemplateLocationCalculator {

    public String calculate(String string) {
        return "index";
    }

}
Run Code Online (Sandbox Code Playgroud)

当我说这不应该花费很长时间来加载时,我希望你会同意我的看法.

java junit jvm spring-tool-suite

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