配置为侦听端口 8080 的 Tomcat 连接器无法启动

2024-02-20

我刚刚下载了这个项目:

https://github.com/oktadeveloper/okta-spring-boot-2-angular-5-example https://github.com/oktadeveloper/okta-spring-boot-2-angular-5-example

本教程中对此进行了解释:

https://developer.okta.com/blog/2017/12/04/basic-crud-angular-and-spring-boot https://developer.okta.com/blog/2017/12/04/basic-crud-angular-and-spring-boot

但是当我尝试使用推荐的命令运行服务器时:

./mvnw spring-boot:run

我得到以下输出:

David@HP /cygdrive/d/wamp64/www/external/okta.example.com/server
$ ./mvnw spring-boot:run
/cygdrive/d/wamp64/www/external/okta.example.com/server
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.okta.developer:demo >-----------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) > test-compile @ demo >>>
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.0.1:testResources (default-testResources) @ demo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\wamp64\www\external\okta.example.com\server\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:testCompile (default-testCompile) @ demo ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) < test-compile @ demo <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) @ demo ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.1.RELEASE)

2018-07-12 20:35:06.400  INFO 2812 --- [           main] com.okta.developer.demo.DemoApplication  : Starting DemoApplication on HP with PID 2812 (D:\wamp64\www\external\okta.example.com\server\target\classes started by David in D:\wamp64\www\external\okta.example.com\server)
2018-07-12 20:35:06.410  INFO 2812 --- [           main] com.okta.developer.demo.DemoApplication  : No active profile set, falling back to default profiles: default
2018-07-12 20:35:06.499  INFO 2812 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@ae5e109: startup date [Thu Jul 12 20:35:06 CDT 2018]; root of context hierarchy
2018-07-12 20:35:08.603  INFO 2812 --- [           main] o.s.b.f.s.DefaultListableBeanFactory     : Overriding bean definition for bean 'httpRequestHandlerAdapter' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration; factoryMethodName=httpRequestHandlerAdapter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration; factoryMethodName=httpRequestHandlerAdapter; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]]
2018-07-12 20:35:09.470  INFO 2812 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$29541950] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-07-12 20:35:10.064  INFO 2812 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2018-07-12 20:35:10.114  INFO 2812 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

...

Using generated security password: 4f87a125-b4d8-47c0-9a24-bb5fb3b2a658

2018-07-12 20:35:17.428  INFO 2812 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3052460, org.springframework.security.web.context.SecurityContextPersistenceFilter@76eee741, org.springframework.security.web.header.HeaderWriterFilter@622ee9f2, org.springframework.security.web.authentication.logout.LogoutFilter@59d663e0, org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter@a2d3781, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@7492ef4f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@77d8457b, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1e249f41, org.springframework.security.web.session.SessionManagementFilter@43e1a956, org.springframework.security.web.access.ExceptionTranslationFilter@7130b0d2, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@384e11db]
2018-07-12 20:35:17.539  INFO 2812 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2018-07-12 20:35:17.558  INFO 2812 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-07-12 20:35:17.558  INFO 2812 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
2018-07-12 20:35:17.558  INFO 2812 --- [           main] s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto protected java.util.Map<java.lang.String, java.util.Map<java.lang.String, org.springframework.boot.actuate.endpoint.web.Link>> org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping.links(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2018-07-12 20:35:17.660  INFO 2812 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2018-07-12 20:35:17.665  INFO 2812 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Bean with name 'dataSource' has been autodetected for JMX exposure
2018-07-12 20:35:10.114  INFO 2812 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.29
2018-07-12 20:35:17.684  INFO 2812 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Located MBean 'dataSource': registering with JMX server as MBean [com.zaxxer.hikari:name=dataSource,type=HikariDataSource]
2018-07-12 20:35:17.755 ERROR 2812 --- [           main] o.apache.catalina.core.StandardService   : Failed to start connector [Connector[HTTP/1.1-8080]]

org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-8080]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:256) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:300) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.0.5.RELEASE.jar:5.0.5.RELEASE]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at com.okta.developer.demo.DemoApplication.main(DemoApplication.java:23) [classes/:na]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_172]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_172]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_172]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_172]
        at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496) [spring-boot-maven-plugin-2.0.1.RELEASE.jar:2.0.1.RELEASE]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_172]
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1020) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        ... 19 common frames omitted
Caused by: java.net.BindException: Address already in use: bind
        at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_172]
        at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_172]
        at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_172]
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_172]
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_172]
        at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018) ~[tomcat-embed-core-8.5.29.jar:8.5.29]
        ... 20 common frames omitted

2018-07-12 20:35:17.770  INFO 2812 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2018-07-12 20:35:17.815  INFO 2812 --- [           main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-07-12 20:35:17.820 ERROR 2812 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.

2018-07-12 20:35:17.820  INFO 2812 --- [           main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@ae5e109: startup date [Thu Jul 12 20:35:06 CDT 2018]; root of context hierarchy
2018-07-12 20:35:17.825  INFO 2812 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2018-07-12 20:35:17.825  INFO 2812 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans
2018-07-12 20:35:17.835  INFO 2812 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2018-07-12 20:35:17.835  INFO 2812 --- [           main] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed drop of schema as part of SessionFactory shut-down'
2018-07-12 20:35:17.850  INFO 2812 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2018-07-12 20:35:17.860  INFO 2812 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
[WARNING]
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:496)
    at java.lang.Thread.run (Thread.java:748)
Caused by: 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.checkThatConnectorsHaveStarted (TomcatWebServer.java:228)
    at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start (TomcatWebServer.java:203)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer (ServletWebServerApplicationContext.java:300)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh (ServletWebServerApplicationContext.java:162)
    at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:553)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:140)
    at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:759)
    at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:395)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:327)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1255)
    at org.springframework.boot.SpringApplication.run (SpringApplication.java:1243)
    at com.okta.developer.demo.DemoApplication.main (DemoApplication.java:23)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:496)
    at java.lang.Thread.run (Thread.java:748)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.171 s
[INFO] Finished at: 2018-07-12T20:35:17-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.1.RELEASE:run (default-cli) on project demo: An exception occurred while running. null: InvocationTargetException: Connector configured to listen on port 8080 failed to start -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

正如你所看到的,有一行这样写:

The Tomcat connector configured to listen on port 8080 failed to start. 

关于如何使服务器工作有什么想法吗?

Thanks!


它显示“BindException:地址已在使用中:bind”,您必须已经在端口 8080 下运行某些应用程序。尝试终止该服务器并重新启动,或为此应用程序使用不同的端口,例如 8081。如果不能检查哪个应用程序已经在使用端口 8080,使用以下命令

netstat -anob 

现在,假设您使用的是 Windows,您可以通过任务管理器检查并终止该应用程序。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

配置为侦听端口 8080 的 Tomcat 连接器无法启动 的相关文章

  • 合并 2 个 .jks 信任库文件

    我正在使用启用了 SSL 的 Tomcat 并使用信任库进行客户端身份验证 我有两个 jks trustore 文件 第一个 我将其用于 PROD 环境 另一个用于 TEST 环境客户端证书 我在 Tomcat 上部署了 Web 应用程序
  • 配置 Eclipse 将 App Engine 类预先捆绑到单个 JAR 中以加快预热速度

    在与另一家同样使用 App Engine 的公司的同事进行讨论后 他告诉我 他通过以下步骤成功地将应用程序预热时间从约 15 秒缩短到约 5 秒 配置 Eclipse 将编译过程中生成的类捆绑到单个 JAR 文件中 配置 Eclipse 以
  • 图像在 3D 空间中绕 Y 轴旋转

    我有一个 BufferedImage 我想用 theta 角而不是仿射变换绕 Java 中的 Y 轴旋转图像 图片 旋转将如下图所示 矩形将是图像 我可以通过旋转图像的每个像素并绘制图像来做到这一点 因为我必须旋转很多图像 所以我认为这不是
  • 如何在 Java 中复制对象?

    考虑下面的代码 DummyBean dum new DummyBean dum setDummy foo System out println dum getDummy prints foo DummyBean dumtwo dum Sys
  • TableModel setCellEditable 并自动将值设置回 false

    我目前正在尝试在 JTable 中实现 JPopupMenu 它允许解锁单元格以进行编辑 Override public void actionPerformed ActionEvent e if e getActionCommand Un
  • 是否有任何理由使用 ZoneId.of("UTC") 而不是 ZoneOffset.UTC ?

    有什么理由使用ZoneId of UTC 代替ZoneOffset UTC 我们知道两者之间的区别 如ZoneOffset UTC 和 ZoneId of UTC 之间有什么区别 https stackoverflow com questi
  • 字符串 a == 字符串 b 的规则 [重复]

    这个问题在这里已经有答案了 我试图了解字符串池的工作原理以及一个字符串等于另一个字符串的规则是什么 例如这个片段 public static void main String hi String s1 lol String s2 lol S
  • 相对重力

    我最近开始使用jMonkey引擎 这非常好 但我在尝试实现相对重力时陷入了困境 我想让行星彼此围绕轨道运行 不一定是完美的圆形轨道 取决于速度 所以每个对象都应该影响其他对象 我现在拥有的 关闭全球重力 bulletAppState get
  • java springrabbit - 优雅地拒绝消息

    我有以下侦听器方法 Override public void onMessage Message message Channel channel try do something bad catch Exception e try long
  • 是否有适用于 Java 的 CalDAV 客户端库? [关闭]

    很难说出这里问的是什么 这个问题是含糊的 模糊的 不完整的 过于宽泛的或修辞性的 无法以目前的形式得到合理的回答 如需帮助澄清此问题以便重新打开 访问帮助中心 help reopen questions 我想使用 CalDAV 协议与我的日
  • 错误包括 bouncycastle 提供商

    我需要使用bouncycastle provider我的项目中的库 我已将其包含在 gradle 项目中 apply plugin application sourceCompatibility 1 6 version 1 0 0 main
  • 将序列化数据发送到 servlet 时出现 java.io.EOFException

    我正在尝试从 Java 本地应用程序上传一个包含文件到服务器的对象 我的计划是 在 tomcat 上运行的 servlet 将使用以下方法获取对象ObjectInputStream in the doGet方法 但我得到一个EOFExcep
  • mysql 准备好的语句错误:MySQLSyntaxErrorException

    我使用准备好的语句编写了选择语句 每次尝试运行都会出现此错误 我如何克服这个错误 我的jdbc连接器是mysql connector java 5 1 13 bin jar 我的代码 public Main add ad to getAdD
  • 在Android项目中引用(纯java)项目(找不到类)

    我试图在我的 Android 项目中引用一个纯 java 项目 gt Java 项目有一大堆我需要使用的类 哦 正如第一个回复所指出的 我正在使用 eclipse 是的 唯一的问题是 我总是找不到类 XXX 从方法 com example
  • jasper 报告文件中出现错误

    首先 我在 iReport 5 1 0 中创建一个 R D1 jrxml 文件 我执行该报告的 Java 代码如下所示 import java sql Connection import java sql DriverManager imp
  • 如何预先填充 JFileChooser 将“文件名”?

    我打算用数据库中的名称填充 JFileChooser 但使用标准 JFileChooser 对话框进行加载 删除 保存和另存为 我想给用户留下这样的印象 他们正在处理文件系统 而在后端使用数据库来保存更改 用户不应该能够浏览到不同的目录进行
  • Java无损保存原始JPEG

    如下所示 我有第一张图像是原始 JPEG 图像 第二张图像用于缓冲图像 然后使用保存http www lac inpe br JIPCookbook 6040 howto compressimages jsp http www lac in
  • SWT StyledText 有高度限制吗?

    我正在尝试创建一个应用程序 其中包含在 ScrolledComposite 中显示的 StyledText 框 我在 StyledText 框中显示大量行时遇到困难 超过 2 550 行似乎会导致问题 StyledText 框本身不能有滚动
  • TCP 中推送标志和紧急标志之间的区别

    我试图理解带有标志的 TCP 段之间的区别PSH和旗帜URG 我阅读了 RFC 但仍然无法获取它 其中一个在将数据发送到进程之前是否缓冲数据 而另一个则没有 它们是两种截然不同的机制 PSH 和 PUSH 函数 当您发送数据时 您的TCP缓
  • Spring - 使用存储过程时使用 simplejdbccall 进行批量更新

    我正在使用 spring jdbc 模板 使用存储过程创建记录 public Long create City obj SimpleJdbcCall jdbcCall new SimpleJdbcCall getJdbcTemplate g

随机推荐

  • 按钮位于画布中央

    我有 4 个重叠的画布 充当图层 绝对定位并水平和垂直居中 在此画布上 我想在画布中心的一列中覆盖四个 HTML CSS 按钮 用于游戏菜单 我是 CSS 和 HTML 的新手 我一直无法弄清楚如何让按钮在绝对定位的画布上居中 我怎样才能做
  • 通用扩展类并实现接口[重复]

    这个问题在这里已经有答案了 这听起来可能是一个奇怪的问题 但是如何定义一个必须扩展类并实现接口的泛型呢 我目前有一个具有以下原型的通用函数 public static
  • cudaArray 与设备指针

    我对设备指针和设备指针的预期用途之间的区别感到困惑cudaArray结构 有人可以解释一下为什么我会使用其中一种而不是另一种吗 我的基本问题是 在浏览文档并阅读 CUDA by Example 一书之后 我不明白 API 设计者的意图 从我
  • 使用 Sprite Kit 创建自定义滑块 - 如何传递@selector?

    我正在开发的 Sprite Kit 游戏使用自定义滑块充当颜色选择器 颜色是从滑块轨道图形中选取的 这是一个UIImage包含梯度 我研究过使用定制的UISlider 但是标准的 IOS UI 控件不能很好地与 Sprite Kit 的场景
  • 如何通过 python 脚本在 ArcGIS 中添加 shapefile?

    我正在尝试使用 Python 自动执行 ArcGIS Desktop 通常使用 ArcMap 中的各种任务 并且我一直需要一种将形状文件添加到当前地图的方法 然后对其做一些事情 但那是另一个故事 到目前为止我能做的最好的就是添加一个laye
  • AngularJS ng-options 将数据类型添加到选项的值

    尝试使用最新版本 1 5 8 的 AngularJS 和 ng options 来填充下拉列表 问题是它添加了数据类型和值 如下所示
  • 如何将YUV_420_888图像转换为位图[重复]

    这个问题在这里已经有答案了 我正在开发 AR 项目 我需要捕获当前帧并将其保存到图库 我可以使用AR core中的Frame类获取图像 但图像的格式是YUV 420 888 我已经尝试了很多解决方案来将其转换为位图 但无法解决它 这就是我转
  • 在 Safari 9.1.2 中,悬停时的 SVG 转换失败 (11601.7.7)

    我试图在悬停时将文本和 svg 淡入另一种颜色 a color ff0000 display inline block margin 0 0 0 1em text decoration none text transform lowerca
  • Linux 中 C 语言的消息框

    我想在 Linux 中用 C 执行程序后显示 成功 弹出消息 它应该在 KDE 和 GNOME 上运行 我怎样才能做到这一点 您正在寻找桌面通知 http www galago project org specs notification
  • 如何将 Apache 配置为仅分叉一个子进程/工作进程?

    我希望启动 apache 以便它分叉一个子进程 我正在分析一个模块 我知道 X 标志 根据文档 两个指令对活动子进程的数量设置了硬性限制 以及子进程中的服务器线程数 并且只能是 通过完全停止服务器然后再次启动来更改 ServerLimit
  • JFormattedTextField 仅限于 0 或 1

    我想限制用户可以在文本字段中输入的字符 如何限制 JFormattedTextField 仅接受 0 或 1 的 8 位数字 Use 文档过滤器 https stackoverflow com a 9430683 714968与模式JTex
  • 使用 FBGraph 登录 Facebook

    我是 iOS 开发新手 我想从我的 iPhone 应用程序连接到 Facebook 我跟着FBGraph API https github com reallylongaddress iPhone Facebook Graph API tr
  • Docker - 在源文件中构建 Arg

    我正在尝试构建一个 Docker 容器 我想将其源标签作为参数传递 构建脚本 docker build pull true build arg version version Docker 文件 ARG version FROM regis
  • Django:自定义中间件被调用两次

    我有一个自定义中间件 每个请求都会调用两次 我不明白为什么 这是我的中间件 class MyMiddleWare object def process request self request print FOO return None 这
  • Spark AccumulableCollection 不适用于 mutable.Map

    我正在使用 Spark 进行员工记录累积 为此我使用 Spark 的累加器 我使用 Map empId emp 作为cumulableCollection 以便我可以通过员工的 id 搜索员工 我已经尝试了一切 但它不起作用 有人可以指出我
  • 无论缓冲区设置如何,PHP 命令行输出缓冲区都会输出

    我正在为一些类编写单元测试 这些类在其中有回声 我想抑制这个输出和想法ob start and ob clean 就足够了 但它们没有效果 public function testSomething ob start class new M
  • 合并 Spark scala Dataframe 中的行

    合并 Spark Dataframe 中的行 我有如下数据 ID Name Passport Country License UpdatedtimeStamp 1 Ostrich 12345 ABC 11 02 2018 1 BCD 10
  • 应用程序无法正确启动(0xc000007b)Visual Studio C++

    我有一个简单的 hello world C 程序 它链接 sqlite3 dll 64 位版本 我已在各自的路径中正确添加了 sqlite3 h 和 sqlite3 dll 这些项目针对 64 位架构进行编译 编译和链接都很顺利 当我尝试运
  • 如何覆盖 Angular 2 材质样式?

    我在有角度的材料中选择了这个 它的代码
  • 配置为侦听端口 8080 的 Tomcat 连接器无法启动

    我刚刚下载了这个项目 https github com oktadeveloper okta spring boot 2 angular 5 example https github com oktadeveloper okta sprin