我正在使用eclipse-sts,用选项“运行为-”来启动我的Spring启动项目
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.4.0.RELEASE)
[INFO ] 2016-10-11 11:22:54.170 [main] RestApplication - Starting RestApplication on Mateusz-PC with PID 8304 (C:\Users\Mateusz\Documents\RESTService\target\classes started by Mateusz in C:\Users\Mateusz\Documents\RESTService)
[INFO ] 2016-10-11 11:22:54.214 [main] RestApplication - No active profile set, falling back to default profiles: default
[INFO ] 2016-10-11 11:22:54.347 [main] AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@209da20d: startup date [Tue Oct 11 11:22:54 CEST 2016]; root of context hierarchy
[INFO ] 2016-10-11 11:22:54.375 [background-preinit] Version - HV000001: Hibernate Validator 5.2.4.Final
[WARN ] 2016-10-11 11:22:54.798 [main] AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [pl.kaczynski.RestApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
[ERROR] 2016-10-11 11:22:54.907 [main] SpringApplication - Application startup failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [pl.kaczynski.RestApplication]; nested exception is java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:546) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:286) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:204) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:173) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:321) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174) [spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
at pl.kaczynski.RestApplication.main(RestApplication.java:11) [classes/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Method.java:483) ~[?:1.8.0_31]
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?]
Caused by: java.lang.IllegalStateException: Failed to introspect annotated methods on class org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:163) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:301) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:537) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 21 more
Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContext
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_31]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693) ~[?:1.8.0_31]
at java.lang.Class.getDeclaredMethods(Class.java:1967) ~[?:1.8.0_31]
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:301) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:537) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 21 more
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContext
at java.net.URLClassLoader$1.run(URLClassLoader.java:372) ~[?:1.8.0_31]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[?:1.8.0_31]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_31]
at java.net.URLClassLoader.findClass(URLClassLoader.java:360) ~[?:1.8.0_31]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_31]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[?:1.8.0_31]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_31]
at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:1.8.0_31]
at java.lang.Class.privateGetDeclaredMethods(Class.java:2693) ~[?:1.8.0_31]
at java.lang.Class.getDeclaredMethods(Class.java:1967) ~[?:1.8.0_31]
at org.springframework.core.type.StandardAnnotationMetadata.getAnnotatedMethods(StandardAnnotationMetadata.java:152) ~[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:301) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:237) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:537) ~[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
... 21 more
那么,伙计们,我应该如何在IntelliJ中做到这一点??
您需要创建运行配置。跑-
关于如何解决这个问题的想法吗?)
我最近在macOS High Sierra中安装了新的Spring工具套件4,但当我尝试运行Lombok的安装时,它找不到我的STS安装, 我按照以下步骤进行手动安装(将-javaagent添加到ini文件),但运气不好:https://www.edvpfau.de/sts-spring-tool-suite-4-mit-lombok/. 知道吗?
我试图在STS3.7.1中创建一个项目。当我尝试创建spring starter项目时,它给了我一个类似这样的错误... IOException:服务器返回URL的HTTP响应代码:403:HTTP://start.spring.io/starter。zip?name=hello-boot&groupid=org。test&artifactid=hello-boot&version=0.0.1-s
我正在创建一个简单的spring-boot项目,方法是http://start.spring.io并选择web和执行器作为依赖项。我的spring-boot版本是1.5.2.RELEASE。项目下载到我的本地计算机。然后解压缩项目并将其作为maven项目导入到我的工作区。我使用spring STS IDE(我认为这无关紧要,但我只是想提一下)。我确实在我的项目中看到错误。显然这是一个构建路径问题,
我正在使用Spring Boot1.4.3.RELEASE制作一个rest应用程序,我已将此应用程序部署在外部tomcat中。该应用程序连接到server.xml中定义的数据源和context.xml.中提供的资源链接。当我手动将war文件添加到tomcat的webapps文件夹并从命令行运行它时,一切正常。但是,当我尝试在STS中运行项目时(运行为- 我的主要课程是: 有人能帮我理解为什么会这样