tl; dr:BindException,检查了 netstat 并且没有运行任何端口 gretty 被告知要抓取。如果这有什么不同,我就在 FreeBSD 上,并且股票插件绑定好了,虽然不能做 websockets。
我有一个由 gradle 构建的 Spring 应用程序(我使用 Gretty 的唯一原因是因为我需要 websockets,并且默认插件中的 Jetty 版本看起来很古老),我的 appserver gradle 文件看起来像通用的来自 gretty 配置文档
apply plugin: 'war'
apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'
gretty{
port = 8080
contextPath = '/app'
servletContainer = 'jetty8'
}
主要的 build.gradle 文件是非常标准的,几乎只是声明我的依赖项
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'scala'
group = 'com.app'
version = '1.0-SNAPSHOT'
description = """app"""
sourceCompatibility = '1.7'
targetCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath 'org.liquibase:liquibase-gradle-plugin:1.+'
classpath 'mysql:mysql-connector-java:5.1.+'
}
}
repositories {
maven{
url "http://repo.spring.io/release"
}
maven{
url "http://repo.spring.io/milestone"
}
mavenLocal()
mavenCentral()
}
dependencies {
compile group: 'org.springframework', name: 'spring-webmvc', version:'4.1.+'
compile group: 'org.thymeleaf', name: 'thymeleaf-spring4', version:'2.1.+'
compile group: 'org.springframework.security', name: 'spring-security-web', version:'4.0.+'
compile group: 'org.springframework.security', name: 'spring-security-messaging', version:'4.0.+'
compile group: 'org.thymeleaf.extras', name: 'thymeleaf-extras-springsecurity4', version:'2.1.+'
compile group: 'org.springframework.security', name: 'spring-security-config', version:'4.0.+'
compile group: 'org.hibernate', name: 'hibernate-entitymanager', version:'4.3.+'
compile group: 'org.springframework.data', name: 'spring-data-commons', version:'1.10.+'
compile group: 'org.springframework.data', name: 'spring-data-jpa', version:'1.8.+'
compile group: 'org.springframework', name: 'spring-messaging', version: '4.1.+'
compile group: 'org.springframework', name: 'spring-websocket', version: '4.1.+'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.+'
compile 'com.fasterxml.jackson.core:jackson-databind:2.5.+'
compile 'org.scala-lang:scala-library:2.11.+'
testCompile group: 'junit', name: 'junit', version:'4.10'
testCompile group: 'org.mockito', name: 'mockito-core', version:'2.0.+'
testCompile group: 'org.springframework', name: 'spring-test', version:'4.1.+'
providedCompile group: 'javax', name: 'javaee-web-api', version:'7.0'
}
apply from: 'appserver.gradle'
apply from: 'database.gradle'
数据库 gradle 文件包含我的 Liquibase 配置。有什么建议吗?我已经检查了所有内容,这对我来说似乎是一个独特的问题。甚至尝试重新启动但没有运气