我有一个cron作业,它执行一些操作,并发送电子邮件的异常。我遇到了一个问题,当我有 spring.main.web-application-type=NONE 在我的application.properties文件中设置,但我能够接收电子邮件时,这是删除。 我需要上面的属性来启动应用程序每天由cron。如果删除此属性,应用程序将在第一次运行时运行良好,并在以后的执行中抛出以下错误 Address already in use
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[o
我是spring-boot的新手。我已经使用gradle build创建了一个简单的spring-boot版本2.2.6项目。我创建了一个欢迎jsp,只是为了打印一个标题。当我在我的服务器上用运行它时,我得到了404状态,下面是我的build.gradle,应用程序类,控制器类和application.properties文件:
//build.gradle
plugins {
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependenc
在构建源代码时,我会遇到以下错误。
[ERROR] Failed to execute goal on project spring-boot-actuator-autoconfigure: Could not resolve dependencies for project org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.2.6.RELEASE: Failure to find org.springframework.boot:spring-boot-test-support:jar:2.2.6.RELEAS
我有三个项目通用数据:单独的maven java项目应用程序-1: spring boot app应用程序-2: spring boot app
我希望在应用程序和应用程序中都包含该公共数据项目作为依赖项。但是,当我在application-1中添加依赖项时,spring boot项目启动了,但没有运行。
这是终点:当在任何应用程序中包含公共数据的依赖项时,我会得到404FOUND错误。
<dependencies>
<!-- Add typical dependencies for a web application -->
<!-- Adds
当我试图在eclipse中运行应用程序(Run as > Java application )时,我得到了这个错误:
Caused by: org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath.
at org.springf
我定义了一个带有注释配置的类
@Configuration
@AutoConfigureAfter(EndpointAutoConfiguration.class)
public class EndpointConfiguration {
@Resource
private MetricsEndpoint metricsEndpoint;
@Bean
public MetricsFormatEndpoint metricsFormatEndpoint() {
return new
我遵循了下面的Spring Web Sockets指南,在stomp上使用Spring Web Sockets创建应用程序。当我使用Spring Boot嵌入式Tomcat运行应用程序时,它工作得很好。但是,现在我想将其部署到Tomcat7的本地实例上。
我已经将Application类修改为以下内容:
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application extends SpringBootServletInitializer {
public static void main