使用spring-boot和jetty,我希望能够配置我的应用程序来侦听其他端口,这些端口是以编程方式在运行时添加的 (+ ?)。
我尝试过的:
我跟踪了,它允许我监听多个端口。这是完美的,但不幸的是,只有在启动时才能起作用。
我尝试过将@Autowiring一个类添加到服务中,这样我就可以添加连接器了--我得到了错误No qualifying bean of type [org.eclipse.jetty.server.Server] found ...
build.gradle (依赖关系)
buildscript {
dependencies {
classpat
我正在将web应用程序迁移到Spring Boot应用程序,该应用程序无法启动,并显示以下错误消息: An attempt was made to call the method org.eclipse.jetty.server.Server.
<init>(Lorg/eclipse/jetty/util/thread/ThreadPool;)V but it does not
exist.
Its class, org.eclipse.jetty.server.Server, is available from the
f
我正在将springboot应用程序更新到1.5.9,并且在嵌入jetty服务器时遇到以下运行时(空指针)异常:
Caused by: java.lang.NullPointerException
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:207) ~[spring-web-4.3.13.RELEASE.jar:4.3.13.RELEASE]
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterH
当将spring引导应用程序部署到google应用程序引擎灵活的env时,我面临着问题。我只想在GAE灵活的env中部署,因为我已经在这上面运行了一些服务(在同一个gcp项目中)。因此,我希望将其部署为一个新的独立服务,可以配置分派文件来运行微服务系统。
Exception in thread "main" java.lang.IllegalStateException: No Available Context
at com.google.cloud.runtimes.jetty9.DeploymentCheck.lifeCycleStarted(Deployment
我正在尝试将springboot rest api部署到谷歌云的应用程序引擎,遵循最近的教程:https://medium.com/@smccartney09/deploy-a-spring-boot-api-to-gcp-app-engine-722198bab4d4and 然而,我得到了这个错误: org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory
当我执行gradlew appengineRun时,我总是得到:
Starting a Gradle Daemon (subsequent builds will be faster)
Mar 26, 2018 5:47:48 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error c
我已经成功地创建了一个Spring Boot应用程序,当我通过eclipse run as-> Spring Boot application执行该应用程序时,该应用程序成功启动,并且我能够通过主机访问主页:8080/
但是我独立启动tomcat并使用tomcat应用程序管理器部署war文件,我无法通过 host:8080/访问我的应用程序,因为这将打开tomcat主页,而不是我的应用程序。你能帮我解决这个问题吗?
我正在尝试用Jetty代替Tomcat,作为我的嵌入式servlet容器。然后需要使用EmbeddedServletContainerCustomizer()将端口80处的重定向请求配置为端口443 (HTTPS)。但我一开始就被这些渐变构建错误困住了:
RedirectHttpToHttpsOnJettyConfig.java:7:错误:包org.springframework.boot.context.embedded不存在
导入org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
Re
我有一个spring boot应用程序,它使用spring boot starter web。这将创建一个正在运行的Tomcat实例,并设置在一个端口上运行的http服务器。在我的camel路径中,我想使用这个http服务器作为http请求的组件,但是我不知道如何利用它。我看到了许多配置jetty实例并从中消费的示例,但我实际上不是有两个http服务器在运行吗?我只想要一个。我假设http服务器已经自动启动了,因为我可以使用其他spring代码(比如RestController)来使用它,我也可以在spring启动日志中看到它已经启动了。
@Component
public class Exa