- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个项目,我正在其中工作,它是使用 Java 11+Spring Boot+Gradle 制作的。
突然,当我在 IntelliJ Idea Ultimate 2019.3 上按下播放键时,出现以下错误。
<String that tells the given command for launching the app>
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.4.RELEASE)
org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 8080 failed to start
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.checkConnectorHasStarted(TomcatWebServer.java:232)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.checkThatConnectorsHaveStarted(TomcatWebServer.java:224)
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:202)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:311)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:164)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at it.niuma.epp.EPPApplication.main(EPPApplication.java:79)
Process finished with exit code 0
仅此而已。 Main类的代码就是由这些行组成的
@EnableScheduling
@EnableAsync
@SpringBootApplication(scanBasePackages = {list of packages})
public class EPPApplication implements WebMvcConfigurer {
public static void main(String[] args) {
/* Allows slash url encoding */
// System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH",
// "true");
SpringApplication.run(EPPApplication.class, args);
}
如果我没有将 SpringApplication.run 包含在 try-catch 范围内,我什至不会收到错误。
该项目尝试在端口 8080 上启动,该端口没有被任何东西占用。事实上,通过输入
netstat -ano|findstr "PID :8080"
在我的 Windows 计算机上,这是显示的结果
C:\Users\Gianmarco>netstat -ano|findstr "PID :8080"
Proto Indirizzo locale Indirizzo esterno Stato PID
TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 18152
TCP [::]:8080 [::]:0 LISTENING 18152
当我尝试更改为任何其他可能的端口时,我总是会遇到相同的错误。
我错过了什么?我试图在 SO 上看到其他类似的问题,但没有人遇到我同样的问题
编辑:Eclipse 上也会发生同样的情况
EDIT2:通过从 org.apache.catalina.connector.Connector.startInternal()
开始跟踪调试器,我发现它甚至到达了记录器部分,其中声明已在端口上启动了 tomcat 8080 但这没有记录在控制台上。不久之后,我到达 SpringApplication.java 的第 400 行,它调用第 327 行,在其中我看到变量 colled exceptionReporters (一个集合)持有一个期望。以下屏幕截图代表了该集合所包含的内容。不过,在这之后,我似乎无法再调试了,但应用程序仍然卡住
应用程序属性
EDIT3:根据要求,这是我的 application.properties,我的 build.gradle
server.port=8080
application.base.path=/opt/epp
spring.datasource.tomcat.minSize=35
spring.datasource.tomcat.initialSize=35
spring.datasource.tomcat.maxActive=250
logging.config=file:config/logback.xml
datasource.type = oracle
# spring.mvc.throw-exception-if-no-handler-found=true
# spring.resources.add-mappings=false
# spring.mvc.static-path-pattern=/**
# spring.resources.static-locations=classpath:/static/
#MAIL CONFIG
spring.mail.default-encoding=UTF-8
[...]
# FROM OLD INTERNAL APPLICATION.PROPERTIES
server.servlet.context-path=/epp
spring.session.store-type=none
#logging.level.org.springframework.web=INFO
#logging.file=log/asta.log
#logging.pattern.file=="%d{dd-MMM-yyyy HH:mm:ss,SSS} %-5p [%c:%L]-> %m%n
spring.mustache.expose-session-attributes=true
spring.mustache.allow-request-override=true
#spring.mustache.allow-session-override=true
#server.session.cookie.max-age=60
#server.session.timeout=60
# Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly.
spring.http.encoding.charset=UTF-8
# Enable http encoding support.
spring.http.encoding.enabled=true
# Force the encoding to the configured charset on HTTP requests and responses.
spring.http.encoding.force=true
spring.servlet.multipart.max-file-size=150MB
spring.servlet.multipart.max-request-size=150MB
spring.mustache.suffix=.html
####### DEV ONLY, TO CHANGE IN PRODUCTION ##########
#logging.level.org.springframework.security=DEBUG
# see ldap.enabled
ldap.mock_email = false
debug.clientTrace = false
remember_me.cookie_only = true
remember_me.enabled_by_default = false
spring.mustache.cache = true
spring.cache.type = simple
#GESTIONE APERTURA VALUTAZIONE DA PARTE DEL BUYER
flg.can.buyer.evaluate=true
flg.gestione.prequalifica=false
#soglia di sbarramento in percentuale
soglia.sbarramento = 40
# in ambiente integrato va decommentato
# server.servlet.session.cookie.name = MYSESSIONID
zip.buffer.size = 8192
构建.gradle
buildscript {
dependencies {
classpath ("org.hidetake:gradle-ssh-plugin:2.8.0")
}
}
plugins {
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'java'
id 'eclipse-wtp'
id "org.zeroturnaround.gradle.jrebel" version "1.1.8"
}
apply plugin: 'org.hidetake.ssh'
apply plugin: 'io.spring.dependency-management'
jar.dependsOn(generateRebel)
compileJava {
options.encoding = 'UTF-8'
}
bootJar {
launchScript()
}
springBoot {
buildInfo {
properties {
artifact = 'EPP-ORDER NTT'
version = project.hasProperty('buildversion') ? buildversion: ''
group = 'it.niuma.epp'
name = 'test+order'
additionalProperties = [
operatingSystem: "${System.properties['os.name']} (${System.properties['os.version']})",
//machine: InetAddress.localHost.hostName,
]
}
}
}
archivesBaseName = project.hasProperty('archives_base_name') ? archives_base_name : 'epp'
ext.jarPath = project.hasProperty('jarPath') ? "${projectDir}/${jarPath}" : "${buildDir}/libs/epp.jar"
//archivesBaseName = project.hasProperty('archives_base_name') ? archives_base_name : 'supplier_portal'
//ext.jarPath = project.hasProperty('jarPath') ? "${projectDir}/${jarPath}" : "${buildDir}/libs/supplier_portal.jar"
ext.deployPath = project.hasProperty('deployPath') ? deployPath : '/opt/epp'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// Framework - START
implementation 'org.springframework.boot:spring-boot-starter'
implementation('org.springframework.boot:spring-boot-starter-data-rest')
implementation('org.springframework.boot:spring-boot-starter-jdbc')
implementation('org.springframework.boot:spring-boot-starter-websocket')
implementation('org.springframework.boot:spring-boot-starter-mustache')
implementation('com.github.sps.mustache:mustache-spring-view:1.4')
implementation('org.springframework.boot:spring-boot-starter-mail')
implementation('org.springframework.boot:spring-boot-starter-web-services')
implementation('org.springframework.boot:spring-boot-starter-security')
implementation('org.springframework.security:spring-security-ldap')
// required by LDAP (spring-ldap bug?)
implementation group: 'commons-pool', name: 'commons-pool', version: '1.6'
// required by Logback for conditional processing
implementation group: 'org.codehaus.janino', name: 'janino', version: '3.0.12'
// Framework - END
// DB - START
implementation('org.sql2o:sql2o:1.6.0-RC3')
implementation group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '7.2.1.jre11'
// FOR INTEGRATION TEST DB
implementation files('libs/ojdbc8.jar')
implementation('org.sql2o.extensions:sql2o-oracle:1.6.0-RC3') {
exclude group:'com.oracle'
}
// DB - END
// Excel support - START
implementation('org.apache.poi:poi:3.16')
implementation('org.apache.poi:poi-ooxml:3.16') {
exclude group:'stax', module: 'stax-api'
}
// Excel support - END
// Cerved - START
implementation files('libs/CervedObject.jar')
implementation files('libs/CervedWebServices.jar')
implementation group: 'com.sun.xml.bind', name: 'jaxb-impl', version: '2.3.2'
implementation group: 'com.sun.istack', name: 'istack-commons-runtime', version: '3.0.8'
// Cerved - END
// START FLYING SAUCER
implementation group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-openpdf', version: '9.1.18'
implementation group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
// END FLYING SAUCER
// START DSS
implementation('org.digidoc4j.dss:dss-pades:5.2.d4j.3')
implementation group: 'org.digidoc4j.dss', name: 'dss-service', version: '5.2.d4j.3'
implementation group: 'org.digidoc4j.dss', name: 'dss-token', version: '5.2.d4j.3'
implementation group: 'org.digidoc4j.dss', name: 'dss-utils-apache-commons', version: '5.2.d4j.3'
// END DSS
// START UNIT TEST 1
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude group: 'junit', module: 'junit'
}
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.4.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.4.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.4.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-commons', version: '1.4.2'
testImplementation group: 'org.junit.platform', name: 'junit-platform-launcher', version: '1.4.2'
// END UNIT TEST 1
// MISCELLANEOUS - START
implementation group: 'org.iban4j', name: 'iban4j', version: '3.2.1'
implementation group: 'org.hibernate', name: 'hibernate-validator', version: '6.0.8.Final'
implementation 'com.opencsv:opencsv:4.0'
implementation group: 'org.unbescape', name: 'unbescape', version: '1.1.6.RELEASE'
// MISCELLANEOUS - END
/***** TOREMOVE - START *****/
// iText 5 - START
implementation('com.itextpdf:itextpdf:5.5.11')
implementation('com.itextpdf.tool:xmlworker:5.5.11')
// iText 5 - END
/***** TOREMOVE - END *****/
/* ORDER Dependecies */
compile group: 'com.google.code.gson', name: 'gson', version: '2.7'
compile group: 'org.digidoc4j.dss', name: 'dss-utils-google-guava', version: '5.2.d4j.3'
compile group: 'org.xhtmlrenderer', name: 'flying-saucer-pdf-openpdf', version: '9.1.12'
// https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-rt
compile group: 'com.sun.xml.ws', name: 'jaxws-rt', version: '2.3.2'
// https://mvnrepository.com/artifact/org.passay/passay
compile group: 'org.passay', name: 'passay', version: '1.4.0'
// SWAGGER
/*****compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.9.2'
compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'
// LOMBOK
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.10' *****/
// MODEL MAPPER
compile group: 'org.modelmapper.extensions', name: 'modelmapper-spring', version: '2.3.2'
}
// START UNIT TEST 2
test {
useJUnitPlatform()
}
test.enabled = gradle.startParameter.taskNames.contains('test') || gradle.startParameter.taskNames.contains('check')
// END UNIT TEST 2
// Remote administration - START
remotes {
server {
deleted sensible data
}
}
ssh.settings {
logging = 'stdout'
knownHosts = allowAnyHosts
}
task copyjar {
doLast {
if (!project.hasProperty('ip')){
logger.lifecycle("No IP - Launch with -Pip=xxx.xxx.xxx.xxx");
throw new StopExecutionException()
}
logger.lifecycle("Copying... <$jarPath to $deployPath>")
ssh.run{
session(remotes.server) {
put from: jarPath, into: deployPath
}
}
}
}
task stopServer {
doLast {
if (!project.hasProperty('ip')){
logger.lifecycle("No IP - Launch with -Pip=xxx.xxx.xxx.xxx");
throw new StopExecutionException()
}
logger.lifecycle("Execute stopServer on $remotes.server.host");
if (project.hasProperty('cmd')){
cmd = project.hasProperty('cmd') ? cmd : ''
ssh.run {
session(remotes.server) {
execute cmd
}
}
} else {
ssh.run {
session(remotes.server) {
execute 'sudo systemctl stop epp.service'
}
}
}
}
}
task startServer{
doLast {
if (!project.hasProperty('ip')){
logger.lifecycle("No IP - Launch with -Pip=xxx.xxx.xxx.xxx");
throw new StopExecutionException()
}
logger.lifecycle("Execute stopServer on $remotes.server.host");
if (project.hasProperty('cmd')){
cmd = project.hasProperty('cmd') ? cmd : ''
ssh.run {
session(remotes.server) {
execute cmd
}
}
} else {
ssh.run {
session(remotes.server) {
execute 'sudo systemctl start epp.service'
}
}
}
}
}
// Remote administration - STOP
task copyBuildFiles(type: Copy) {
from file("application.properties")
into ("$buildDir/libs/")
}
build.dependsOn(copyBuildFiles)
最佳答案
由于缺少日志记录输出,您可能会遇到一些与日志记录相关的依赖项的问题。例如,对 commons-logging:commons-logging
的依赖可能会导致问题,应该排除它,而使用 org.springframework:spring-jcl
。 org.slf4j:jcl-over-slf4j
应进行类似处理。
您可以使用 Gradle 的 dependencyInsight
任务了解类路径上是否存在以下任一依赖项:
gradle dependencyInsight --dependency commons-logging:commons-logging
gradle dependencyInsight --dependency org.slf4j:jcl-over-slf4j
关于java - IDEA Ultimate 2019.3 上的 org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59669527/
我有一个几乎可以构建的Maven / Grails应用,但在web.xml上找不到[my-app]\webapp\WEB-INF\web.xml。但是目录结构像往常一样包含web-app文件夹,而不是
正如我在标题中提到的:我想知道 web-service 和 web-socket 之间的区别?我们什么时候使用每一个? 谢谢! 最佳答案 一个web service是一个响应客户端 SOAP/REST
让我们看一个示例场景: 客户端打开一个网站并找到他从文本框中输入的两个数字的总和。然后单击“添加”按钮。两个参数通过 HTTP GET 发送到服务器,在服务器上写入 PHP 代码以添加数字,结果为回声
我知道这是一个老问题,肯定已经被回答了数百次,但我还无法找到令人满意的答案。 我正在创建一个应用程序,其他应用程序(移动/网络)将使用该应用程序来获取数据。现在我有两个选择: 将我的应用程序创建为简单
通过 Web 作业部署新功能有 3 种方法: 创建一个新的 Web 应用,并部署一个包含该函数的 Web 作业。 向现有 Web 作业添加一项新函数(这样您现在在一个 Web 作业中就拥有了多个函数)
我收到来自网络场景的通知,上面写着“问题”和“确定”。我想在问题发生时包含网络响应的内容。我不担心标题值,只担心网页的内容. 这是我可以在通知设置中引用的变量吗? 最佳答案 不幸的是 zabbix 不
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
嗨,这是一个理论问题,但我真的无法弄清楚 Web 应用程序、基于 Web 的应用程序和基于云的应用程序之间的区别。这个你能帮我吗。 最佳答案 @Matt 是对的 - 这真的无关紧要,但是,为了清楚起见
我正在尝试使用多个 Web 服务,这些服务在它们的 wsdl 中重新定义了一些相同的公共(public)类。我目前在网站中引用了它们,但我想转换为 Web 应用程序。 由于一些相同的类是从多个 Web
一个。我必须考虑哪些事项?b.当前应用程序正在执行多个存储过程。如果我创建等效的方法来执行这些过程,会有什么风险或挑战。 最佳答案 在架构上,将网络应用程序转换为网络服务时必须考虑的一件事是,对方法和
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 5年前关闭。 Improve thi
网络 API 和网络服务之间有什么区别吗?或者它们是同一个吗? 最佳答案 网络服务通常提供 WSDL您可以从中自动创建客户端 stub 。 Web 服务基于 SOAP protocol 。ASP.NE
我已经获得了我需要的所有资源。我将 Web 服务放入应用程序服务环境中,然后将 NSG 连接到应用程序服务环境使用的子网。然后,我允许 VNET 内的应用程序与 Web 服务进行通信,但它无法正常工作
我已经获得了我需要的所有资源。我将 Web 服务放入应用程序服务环境中,然后将 NSG 连接到应用程序服务环境使用的子网。然后,我允许 VNET 内的应用程序与 Web 服务进行通信,但它无法正常工作
我正在使用 stub 将我的网络服务相关测试与实际网络服务隔离开来。 你/我应该如何合并测试以确保我制作的响应与实际的网络服务匹配(我无法控制它)? 我不想知道怎么做,而是何时何地? 我应该为测试数据
我在互联网上搜索了很多,但我仍然没有得到网络服务和网络 API 之间的明显区别?我在某处读到所有 Web 服务都是 API,但所有 API 都不是 Web 服务。如何? 我所知道的是两者都允许利用其他
假设我已经完成了使用 JavaEE 制作的 Web 应用程序。这个 Web 应用程序包含登录系统,但最后它是非常基本的 Web 应用程序。我使用的是 GlassFish 3.1.2.2。 我想知道一旦
我希望设计者能够打开与我相同的解决方案文件。这可以通过 Expressions Web 实现吗? 最佳答案 简短的回答是“不”;但这是一个非常常见的请求,我知道很多人都希望下一个版本(无论何时)对此有
我正在尝试在 CF10 中创建一个 Web 服务对象。我已验证它在 SoapUI 中按预期工作。但是,当我在 CF 中运行它时,我得到一个错误,它无法找到在 WSDL 的导入语句中导入的 XSD。这是
我的要求是开发一个 Web 服务,充当外部 Web 服务和客户端之间的中间人。 我知道,我可以为我的服务设计一个wsdl,然后将外部wsdl映射到代码中我的wsdl。我的问题是有一个开源 api/工具
我是一名优秀的程序员,十分优秀!