- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有以下 Maven 配置
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.project</groupId>
<artifactId>project-service</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<jdk.version>1.8</jdk.version>
<name>project-domain</name>
<start-class>com.wearable.service.WearableServiceApplication</start-class>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons.logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
这是我的应用程序类
package com.project.service;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication
@ComponentScan
@EnableAutoConfiguration
@Slf4j
public class ProjectServiceApplication extends SpringBootServletInitializer {
private static Class<ProjectServiceApplication> app = WearableServiceApplication.class;
public static void main(String[] args) throws Exception {
System.out.println("------------------------------------------------");
SpringApplication.run(app, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(app);
}
}
我期望的是,当我构建这场 war 并将其部署在 jboss 上时,我应该在控制台中看到“--------------------”消息,但是我没有看到任何这些。我也没有看到任何错误。
我遇到的主要问题是我的调度程序无法工作。调度程序类位于 com.project.service.scheduler 包中。这是代码。我不关心 main
/config
方法,但我想知道为什么调度程序不起作用。
@Component
public class DataScheduler {
@Scheduled(fixedDelay = 500, initialDelay = 500)
public void scheduler() {
System.out.println("--------------");
}
}
这是我的 jboss 输出
/Users/username/Documents/dev/wildfly-9.0.2.Final/bin/standalone.sh
/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java -classpath "/Applications/IntelliJ IDEA 14.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA 14.app/Contents/lib/util.jar" -Dfile.encoding=UTF-8 com.intellij.rt.execution.CommandLineWrapper /private/var/folders/17/v3pnl0n532q_fvg8_8m3t2d00000gn/T/classpath0.tmp com.intellij.javaee.oss.process.JavaeeProcess 63982 com.intellij.javaee.oss.jboss.agent.JBoss71Agent
=========================================================================
[2016-08-26 01:02:44,939] Artifact project-service:war: Server is not connected. Deploy is not available.
Detected server admin port: 9990
JBoss Bootstrap Environment
Detected server http port: 8080
JBOSS_HOME: /Users/username/Documents/dev/wildfly-9.0.2.Final
JAVA: /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java
JAVA_OPTS: -server -XX:+UseCompressedOops -server -XX:+UseCompressedOops -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
=========================================================================
01:02:44,922 INFO [org.jboss.modules] (main) JBoss Modules version 1.4.3.Final
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
01:02:45,091 INFO [org.jboss.msc] (main) JBoss MSC version 1.2.6.Final
01:02:45,157 INFO [org.jboss.as] (MSC service thread 1-6) WFLYSRV0049: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) starting
01:02:45,836 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 6) WFLYCTL0028: Attribute 'job-repository-type' in the resource at address '/subsystem=batch' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
01:02:45,841 INFO [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 18) WFLYCTL0028: Attribute 'enabled' in the resource at address '/subsystem=datasources/data-source=ExampleDS' is deprecated, and may be removed in future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
01:02:45,848 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found fitbit-rest-api-1.0-SNAPSHOT.war in deployment directory. To trigger deployment create a file called fitbit-rest-api-1.0-SNAPSHOT.war.dodeploy
01:02:45,855 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
01:02:45,870 INFO [org.xnio] (MSC service thread 1-3) XNIO version 3.3.1.Final
01:02:45,876 INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.3.1.Final
01:02:45,903 INFO [org.jboss.as.security] (ServerService Thread Pool -- 53) WFLYSEC0002: Activating Security Subsystem
01:02:45,903 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
01:02:45,907 INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 37) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
01:02:45,910 INFO [org.jboss.as.security] (MSC service thread 1-6) WFLYSEC0001: Current PicketBox version=4.9.2.Final
01:02:45,921 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 38) WFLYCLINF0001: Activating Infinispan subsystem.
01:02:45,923 INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 44) WFLYJSF0007: Activated the following JSF Implementations: [main]
01:02:45,948 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 46) WFLYNAM0001: Activating Naming Subsystem
01:02:45,954 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 56) WFLYWS0002: Activating WebServices Extension
01:02:45,963 INFO [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 4.0.9.Final
01:02:45,967 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 33) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
01:02:45,969 INFO [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0003: Undertow 1.2.9.Final starting
01:02:45,969 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0003: Undertow 1.2.9.Final starting
01:02:45,986 INFO [org.jboss.as.connector] (MSC service thread 1-7) WFLYJCA0009: Starting JCA Subsystem (IronJacamar 1.2.5.Final)
01:02:45,995 INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0018: Started Driver service with driver-name = h2
01:02:46,070 INFO [org.jboss.as.naming] (MSC service thread 1-5) WFLYNAM0003: Starting Naming Service
01:02:46,070 INFO [org.jboss.as.mail.extension] (MSC service thread 1-6) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
01:02:46,135 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 55) WFLYUT0014: Creating file handler for path /Users/username/Documents/dev/wildfly-9.0.2.Final/welcome-content
01:02:46,157 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0012: Started server default-server.
01:02:46,172 INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting
01:02:46,220 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on /127.0.0.1:8080
01:02:46,315 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
01:02:46,395 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) WFLYDS0013: Started FileSystemDeploymentService for directory /Users/username/Documents/dev/wildfly-9.0.2.Final/standalone/deployments
01:02:46,473 INFO [org.jboss.ws.common.management] (MSC service thread 1-7) JBWS022052: Starting JBoss Web Services - Stack CXF Server 5.0.0.Final
01:02:46,592 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
01:02:46,593 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
01:02:46,593 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) started in 1915ms - Started 203 of 379 services (210 services are lazy, passive or on-demand)
Connected to server
[2016-08-26 01:02:46,954] Artifact project-service:war: Artifact is being deployed, please wait...
01:02:47,055 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "project-service-1.0-SNAPSHOT.war" (runtime-name: "project-service-1.0-SNAPSHOT.war")
01:02:47,826 WARN [org.jboss.as.ee] (MSC service thread 1-7) WFLYEE0007: Not installing optional component org.springframework.http.server.ServletServerHttpAsyncRequestControl due to an exception (enable DEBUG log level to see the cause)
01:02:47,827 WARN [org.jboss.as.ee] (MSC service thread 1-7) WFLYEE0007: Not installing optional component org.springframework.web.context.request.async.StandardServletAsyncWebRequest due to an exception (enable DEBUG log level to see the cause)
01:02:47,958 INFO [io.undertow.servlet] (ServerService Thread Pool -- 22) 2 Spring WebApplicationInitiusernamezers detected on classpath
01:02:48,496 INFO [stdout] (ServerService Thread Pool -- 22)
01:02:48,496 INFO [stdout] (ServerService Thread Pool -- 22) . ____ _ __ _ _
01:02:48,496 INFO [stdout] (ServerService Thread Pool -- 22) /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
01:02:48,497 INFO [stdout] (ServerService Thread Pool -- 22) ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
01:02:48,497 INFO [stdout] (ServerService Thread Pool -- 22) \\/ ___)| |_)| | | | | || (_| | ) ) ) )
01:02:48,497 INFO [stdout] (ServerService Thread Pool -- 22) ' |____| .__|_| |_|_| |_\__, | / / / /
01:02:48,497 INFO [stdout] (ServerService Thread Pool -- 22) =========|_|==============|___/=/_/_/_/
01:02:48,498 INFO [stdout] (ServerService Thread Pool -- 22) :: Spring Boot :: (v1.4.0.RELEASE)
01:02:48,498 INFO [stdout] (ServerService Thread Pool -- 22)
01:02:48,544 INFO [com.project.service.ProjectServiceApplication] (ServerService Thread Pool -- 22) Starting ProjectServiceApplication on muhammads-macbook-pro.local with PID 34679 (started by username in /Users/username/Documents/dev/wildfly-9.0.2.Final/bin)
01:02:48,544 INFO [com.project.service.ProjectServiceApplication] (ServerService Thread Pool -- 22) The following profiles are active: dev
01:02:48,565 INFO [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 22) Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7f63a29f: startup date [Fri Aug 26 01:02:48 EDT 2016]; root of context hierarchy
01:02:48,995 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (ServerService Thread Pool -- 22) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
01:02:49,008 INFO [io.undertow.servlet] (ServerService Thread Pool -- 22) Initializing Spring embedded WebApplicationContext
01:02:49,008 INFO [org.springframework.web.context.ContextLoader] (ServerService Thread Pool -- 22) Root WebApplicationContext: initialization completed in 443 ms
01:02:49,325 INFO [org.springframework.boot.web.servlet.ServletRegistrationBean] (ServerService Thread Pool -- 22) Mapping servlet: 'dispatcherServlet' to [/]
01:02:49,326 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 22) Mapping filter: 'errorPageFilter' to: [/*]
01:02:49,327 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 22) Mapping filter: 'characterEncodingFilter' to: [/*]
01:02:49,327 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 22) Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
01:02:49,327 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 22) Mapping filter: 'httpPutFormContentFilter' to: [/*]
01:02:49,327 INFO [org.springframework.boot.web.servlet.FilterRegistrationBean] (ServerService Thread Pool -- 22) Mapping filter: 'requestContextFilter' to: [/*]
01:02:49,502 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] (ServerService Thread Pool -- 22) Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7f63a29f: startup date [Fri Aug 26 01:02:48 EDT 2016]; root of context hierarchy
01:02:49,547 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 22) Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
01:02:49,548 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] (ServerService Thread Pool -- 22) Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
01:02:49,564 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 22) Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
01:02:49,564 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 22) Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
01:02:49,585 INFO [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping] (ServerService Thread Pool -- 22) Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
01:02:49,698 INFO [org.springframework.jmx.export.annotation.AnnotationMBeanExporter] (ServerService Thread Pool -- 22) Registering beans for JMX exposure on startup
01:02:49,711 INFO [com.project.service.ProjectServiceApplication] (ServerService Thread Pool -- 22) Started ProjectServiceApplication in 1.674 seconds (JVM running for 5.123)
01:02:49,747 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 22) Initializing Mojarra 2.2.12-jbossorg-2 20150729-1131 for context '/project-service-1.0-SNAPSHOT'
01:02:50,659 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 22) WFLYUT0021: Registered web context: /project-service-1.0-SNAPSHOT
01:02:50,671 INFO [org.jboss.as.server] (management-handler-thread - 2) WFLYSRV0010: Deployed "project-service-1.0-SNAPSHOT.war" (runtime-name : "project-service-1.0-SNAPSHOT.war")
[2016-08-26 01:02:50,681] Artifact project-service:war: Artifact is deployed successfully
[2016-08-26 01:02:50,681] Artifact project-service:war: Deploy took 3,727 milliseconds
最佳答案
当 Spring Boot 应用程序打包为 war 并部署到应用服务器时,不会调用 main
方法。而是调用上面显示的 configure
方法。
关于java - jboss 上的 spring boot 应用程序未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39158651/
我正在通过 labrepl 工作,我看到了一些遵循此模式的代码: ;; Pattern (apply #(apply f %&) coll) ;; Concrete example user=> (a
我从未向应用商店提交过应用,但我会在不久的将来提交。 到目前为止,我对为 iPhone 而非 iPad 进行设计感到很自在。 我了解,通过将通用PAID 应用放到应用商店,客户只需支付一次就可以同时使
我有一个应用程序,它使用不同的 Facebook 应用程序(2 个不同的 AppID)在 Facebook 上发布并显示它是“通过 iPhone”/“通过 iPad”。 当 Facebook 应用程序
我有一个要求,我们必须通过将网站源文件保存在本地 iOS 应用程序中来在 iOS 应用程序 Webview 中运行网站。 Angular 需要服务器来运行应用程序,但由于我们将文件保存在本地,我们无法
所以我有一个单页客户端应用程序。 正常流程: 应用程序 -> OAuth2 服务器 -> 应用程序 我们有自己的 OAuth2 服务器,因此人们可以登录应用程序并获取与用户实体关联的 access_t
假设我有一个安装在用户设备上的 Android 应用程序 A,我的应用程序有一个 AppWidget,我们可以让其他 Android 开发人员在其中以每次安装成本为基础发布他们的应用程序推广广告。因此
Secrets of the JavaScript Ninja中有一个例子它提供了以下代码来绕过 JavaScript 的 Math.min() 函数,该函数需要一个可变长度列表。 Example:
当我分别将数组和对象传递给 function.apply() 时,我得到 NaN 的 o/p,但是当我传递对象和数组时,我得到一个数字。为什么会发生这种情况? 由于数组也被视为对象,为什么我无法使用它
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界. 这篇CFSDN的博客文章ASP转换格林威治时间函数DateDiff()应用由作者收集整理,如果你
我正在将列表传递给 map并且想要返回一个带有合并名称的 data.frame 对象。 例如: library(tidyverse) library(broom) mtcars %>% spl
我有一个非常基本的问题,但我不知道如何实现它:我有一个返回数据框,其中每个工具的返回值是按行排列的: tmp<-as.data.frame(t(data.frame(a=rnorm(250,0,1)
我正在使用我的 FB 应用创建群组并邀请用户加入我的应用群组,第一次一切正常。当我尝试创建另一个组时,出现以下错误: {"(OAuthException - #4009) (#4009) 在有更多用户
我们正在开发一款类似于“会说话的本”应用程序的 child 应用程序。它包含大量用于交互式动画的 JPEG 图像序列。 问题是动画在 iPad Air 上播放正常,但在 iPad 2 上播放缓慢或滞后
我关注 clojure 一段时间了,它的一些功能非常令人兴奋(持久数据结构、函数式方法、不可变状态)。然而,由于我仍在学习,我想了解如何在实际场景中应用,证明其好处,然后演化并应用于更复杂的问题。即,
我开发了一个仅使用挪威语的应用程序。该应用程序不使用本地化,因为它应该仅以一种语言(挪威语)显示。但是,我已在 Info.plist 文件中将“本地化 native 开发区域”设置为“no”。我还使用
读完 Anthony's response 后上a style-related parser question ,我试图说服自己编写单体解析器仍然可以相当紧凑。 所以而不是 reference ::
multicore 库中是否有类似 sapply 的东西?还是我必须 unlist(mclapply(..)) 才能实现这一点? 如果它不存在:推理是什么? 提前致谢,如果这是一个愚蠢的问题,我们深表
我喜欢在窗口中弹出结果,以便更容易查看和查找(例如,它们不会随着控制台继续滚动而丢失)。一种方法是使用 sink() 和 file.show()。例如: y <- rnorm(100); x <- r
我有一个如下所示的 spring mvc Controller @RequestMapping(value="/new", method=RequestMethod.POST) public Stri
我正在阅读 StructureMap关于依赖注入(inject),首先有两部分初始化映射,具体类类型的接口(interface),另一部分只是实例化(请求实例)。 第一部分需要配置和设置,这是在 Bo
我是一名优秀的程序员,十分优秀!