跟着拉大锯大神学Android——网络编程中运行后台服务器端口占用问题
拉大锯网页地址:https://www.sunofbeach.net/u/1153952789488054272
跟着拉大锯大神学Android,在学到网络编程时,使用了大神搭建的用于学习的后台服务器,但是在运行时出现了如下的问题,提示端口被占用了,问题和解决方案如下:
PS F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb> java -jar sob-android-mini-web-1.0.0.jar
███████ ██████ ██████
██ ██ ██ ██ ██
███████ ██ ██ ██████
██ ██ ██ ██ ██
███████ ███████ ██████
████████ www.sunofbeaches.com ████████
███████████████████████████
2020-05-25 19:47:02.049 INFO 16772 --- [ main] c.sunofbeaches.android.MainApplication : Starting MainApplication v1.0-SNAPSHOT on CUIJIANCHAO with PID 16772 (F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb\sob-android-mini-web-1.0.0.jar started by cuijianchao in F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb)
2020-05-25 19:47:02.056 INFO 16772 --- [ main] c.sunofbeaches.android.MainApplication : No active profile set, falling back to default profiles: default
2020-05-25 19:47:02.262 INFO 16772 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@52d455b8: startup date [Mon May 25 19:47:02 CST 2020]; root of context hierarchy
2020-05-25 19:47:04.589 INFO 16772 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9102 (http)
2020-05-25 19:47:04.635 INFO 16772 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-25 19:47:04.637 INFO 16772 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2020-05-25 19:47:04.659 INFO 16772 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_131\bin;D:\install\xshell\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\install\platform-tools;C:\WINDOWS\System32\OpenSSH\;D:\Python27;D:\Python27\Scripts;D:\Git\cmd;D:\Python\Python36\Scripts\;D:\Python\Python36\;C:\Users\cuijianchao\AppData\Local\Microsoft\WindowsApps;;.]
2020-05-25 19:47:04.816 INFO 16772 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-25 19:47:04.817 INFO 16772 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2562 ms
2020-05-25 19:47:05.187 INFO 16772 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2020-05-25 19:47:05.197 INFO 16772 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2020-05-25 19:47:05.200 INFO 16772 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2020-05-25 19:47:05.203 INFO 16772 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2020-05-25 19:47:05.211 INFO 16772 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2020-05-25 19:47:05.965 INFO 16772 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:47:06.247 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@52d455b8: startup date [Mon May 25 19:47:02 CST 2020]; root of context hierarchy
2020-05-25 19:47:06.395 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/download/{fileName}],methods=[GET]}" onto public java.lang.String com.sunofbeaches.android.controller.FileController.download(java.lang.String,javax.servlet.http.HttpServletResponse) throws java.io.IOException
2020-05-25 19:47:06.399 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/file/params/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.multiFileUploads(javax.servlet.http.HttpServletRequest,org.springframework.web.multipart.MultipartFile,java.lang.String,java.lang.String)
2020-05-25 19:47:06.402 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/file/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.uploadFile(org.springframework.web.multipart.MultipartFile,javax.servlet.http.HttpServletRequest)
2020-05-25 19:47:06.408 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/files/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.uploadFiles(org.springframework.web.multipart.MultipartFile[],javax.servlet.http.HttpServletRequest)
2020-05-25 19:47:06.427 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/get/text],methods=[GET]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.GetController.getJson()
2020-05-25 19:47:06.431 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/get/param],methods=[GET]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.GetController.getParam(java.lang.String,int,java.lang.String)
2020-05-25 19:47:06.441 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.LoginController.doLogin(java.lang.String,java.lang.String)
2020-05-25 19:47:06.452 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/string],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.PostController.postString(java.lang.String)
2020-05-25 19:47:06.463 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/comment],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.PostController.postComment(com.sunofbeaches.android.domain.Comment)
2020-05-25 19:47:06.473 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2020-05-25 19:47:06.490 INFO 16772 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2020-05-25 19:47:06.540 INFO 16772 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:47:06.545 INFO 16772 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:47:06.673 WARN 16772 --- [ main] org.thymeleaf.templatemode.TemplateMode : [THYMELEAF][main] Template Mode 'LEGACYHTML5' is deprecated. Using Template Mode 'HTML' instead.
2020-05-25 19:47:06.959 INFO 16772 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2020-05-25 19:47:06.999 ERROR 16772 --- [ main] o.apache.catalina.core.StandardService : Failed to start connector [Connector[HTTP/1.1-9102]]
org.apache.catalina.LifecycleException: Failed to start component [Connector[HTTP/1.1-9102]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:225) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:256) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:198) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:300) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) [spring-context-5.0.7.RELEASE.jar!/:5.0.7.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar!/:2.0.3.RELEASE]
at com.sunofbeaches.android.MainApplication.main(MainApplication.java:13) [classes!/:1.0-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [sob-android-mini-web-1.0.0.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [sob-android-mini-web-1.0.0.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [sob-android-mini-web-1.0.0.jar:1.0-SNAPSHOT]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [sob-android-mini-web-1.0.0.jar:1.0-SNAPSHOT]
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.31.jar!/:8.5.31]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 21 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_131]
at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_131]
at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_131]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_131]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) ~[na:1.8.0_131]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:210) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1150) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:591) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1018) ~[tomcat-embed-core-8.5.31.jar!/:8.5.31]
... 22 common frames omitted
2020-05-25 19:47:07.027 INFO 16772 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-05-25 19:47:07.159 INFO 16772 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-05-25 19:47:07.176 ERROR 16772 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
The Tomcat connector configured to listen on port 9102 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 9102, or configure this application to listen on another port.
2020-05-25 19:47:07.189 INFO 16772 --- [ main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@52d455b8: startup date [Mon May 25 19:47:02 CST 2020]; root of context hierarchy
2020-05-25 19:47:07.196 INFO 16772 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
原因:
9102端口被占用了....
解决:
1.打开cmd命令窗口,输入如下指令查看所有端口和PID
netstat -ano
2.找到对应的端口对应的PID 输入指令找到对应的进程
tasklist | findstr "16704"
3.杀掉该进程,再次启动就可以了
taskkill /f /t /im javaw.exe
问题已解决!再次使用java命令运行jar包,如下:
PS F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb> java -jar sob-android-mini-web-1.0.0.jar
███████ ██████ ██████
██ ██ ██ ██ ██
███████ ██ ██ ██████
██ ██ ██ ██ ██
███████ ███████ ██████
████████ www.sunofbeaches.com ████████
███████████████████████████
2020-05-25 19:54:33.856 INFO 14420 --- [ main] c.sunofbeaches.android.MainApplication : Starting MainApplication v1.0-SNAPSHOT on CUIJIANCHAO with PID 14420 (F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb\sob-android-mini-web-1.0.0.jar started by cuijianchao in F:\Android_Develop\sunofbeaches\sunofbeaches-SOBAndroidMiniWeb-master\SOBAndroidMiniWeb)
2020-05-25 19:54:33.866 INFO 14420 --- [ main] c.sunofbeaches.android.MainApplication : No active profile set, falling back to default profiles: default
2020-05-25 19:54:33.971 INFO 14420 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@52d455b8: startup date [Mon May 25 19:54:33 CST 2020]; root of context hierarchy
2020-05-25 19:54:36.424 INFO 14420 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9102 (http)
2020-05-25 19:54:36.469 INFO 14420 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2020-05-25 19:54:36.472 INFO 14420 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.31
2020-05-25 19:54:36.495 INFO 14420 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Java\jdk1.8.0_131\bin;D:\install\xshell\;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\install\platform-tools;C:\WINDOWS\System32\OpenSSH\;D:\Python27;D:\Python27\Scripts;D:\Git\cmd;D:\Python\Python36\Scripts\;D:\Python\Python36\;C:\Users\cuijianchao\AppData\Local\Microsoft\WindowsApps;;.]
2020-05-25 19:54:36.676 INFO 14420 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-05-25 19:54:36.680 INFO 14420 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2716 ms
2020-05-25 19:54:37.067 INFO 14420 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2020-05-25 19:54:37.080 INFO 14420 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2020-05-25 19:54:37.081 INFO 14420 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2020-05-25 19:54:37.083 INFO 14420 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2020-05-25 19:54:37.084 INFO 14420 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2020-05-25 19:54:37.812 INFO 14420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:54:38.087 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@52d455b8: startup date [Mon May 25 19:54:33 CST 2020]; root of context hierarchy
2020-05-25 19:54:38.235 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/file/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.uploadFile(org.springframework.web.multipart.MultipartFile,javax.servlet.http.HttpServletRequest)
2020-05-25 19:54:38.242 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/files/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.uploadFiles(org.springframework.web.multipart.MultipartFile[],javax.servlet.http.HttpServletRequest)
2020-05-25 19:54:38.248 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/download/{fileName}],methods=[GET]}" onto public java.lang.String com.sunofbeaches.android.controller.FileController.download(java.lang.String,javax.servlet.http.HttpServletResponse) throws java.io.IOException
2020-05-25 19:54:38.266 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/file/params/upload],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.FileController.multiFileUploads(javax.servlet.http.HttpServletRequest,org.springframework.web.multipart.MultipartFile,java.lang.String,java.lang.String)
2020-05-25 19:54:38.270 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/get/param],methods=[GET]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.GetController.getParam(java.lang.String,int,java.lang.String)
2020-05-25 19:54:38.275 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/get/text],methods=[GET]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.GetController.getJson()
2020-05-25 19:54:38.291 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.LoginController.doLogin(java.lang.String,java.lang.String)
2020-05-25 19:54:38.297 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/string],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.PostController.postString(java.lang.String)
2020-05-25 19:54:38.299 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/post/comment],methods=[POST]}" onto public com.sunofbeaches.android.response.ResponseResult com.sunofbeaches.android.controller.PostController.postComment(com.sunofbeaches.android.domain.Comment)
2020-05-25 19:54:38.315 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2020-05-25 19:54:38.329 INFO 14420 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2020-05-25 19:54:38.415 INFO 14420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:54:38.417 INFO 14420 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2020-05-25 19:54:38.564 WARN 14420 --- [ main] org.thymeleaf.templatemode.TemplateMode : [THYMELEAF][main] Template Mode 'LEGACYHTML5' is deprecated. Using Template Mode 'HTML' instead.
2020-05-25 19:54:38.953 INFO 14420 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2020-05-25 19:54:39.089 INFO 14420 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9102 (http) with context path ''
2020-05-25 19:54:39.107 INFO 14420 --- [ main] c.sunofbeaches.android.MainApplication : Started MainApplication in 6.075 seconds (JVM running for 7.142)
path -- > file:/F:/Android_Develop/sunofbeaches/sunofbeaches-SOBAndroidMiniWeb-master/SOBAndroidMiniWeb/sob-android-mini-web-1.0.0.jar!/BOOT-INF/classes!/
resutlPath -- > F:/Android_Develop/sunofbeaches/sunofbeaches-SOBAndroidMiniWeb-master/SOBAndroidMiniWeb/
运行成功!
跟着拉大锯大神学Android——网络编程中运行后台服务器端口占用问题的更多相关文章
- 1.Android网络编程-HTML介绍
1.HTML介绍 超文本标记语言(HyperText Markup Language,简称:HTML)是一种用于创建网页的标准标记语言. 在Eclipse下则可以使用自带的浏览器浏览html: 2.H ...
- Android网络编程系列 一 TCP/IP协议族
在学习和使用Android网路编程时,我们接触的仅仅是上层协议和接口如Apache的httpclient或者Android自带的httpURlconnection等等.对于这些接口的底层实现我们也有必 ...
- Android网络编程概述
Android网络编程概述 首先,应该了解的几个问题: 1)Android平台网络相关API接口 a) java.net.*(标准Java接口) java.net.*提供与联网有关的类,包括流.数据包 ...
- Android 网络编程 记录
简单介绍 看了深入理解Android网络编程感觉不错.今天对Android网络编程进行了要点记录. 内容 Android基于网络技术和编程实践 要点 定义 描写叙述 IP协议 用于报文交换网络的一种面 ...
- Android网络编程(三)Volley使用方法全解析
相关文章 Android网络编程(一)HTTP协议原理 Android网络编程(二)HttpClient与HttpURLConnection 前言 Volley想必许多人都用过,为了建立网络编程的知识 ...
- Android网络编程随想录(1)
本系列文章对整个Android网络编程进行了总结,包括基本的TCP/IP协议,HTTP协议,HTTPS协议,HttpClient,UrlConnection,一些网络通信的库到棉花糖新加入的OKHTT ...
- Android网络编程只局域网传输文件
Android网络编程之局域网传输文件: 首先创建一个socket管理类,该类是传输文件的核心类,主要用来发送文件和接收文件 具体代码如下: package com.jiao.filesend; im ...
- Android网络编程基础
Android网络编程只TCP通信 TCP 服务器端工作的主要步骤如下.步骤1 调用ServerSocket(int port)创建一个ServerSocket,并绑定到指定端口上.步骤2 调用acc ...
- Android网络编程系列 一 Socket抽象层
在<Android网络编程>系列文章中,前面已经将Java的通信底层大致的描述了,在我们了解了TCP/IP通信族架构及其原理,接下来我们就开始来了解基于tcp/ip协议层的Socket抽 ...
随机推荐
- 网络流--最大流--Dinic模板矩阵版(当前弧优化+非当前弧优化)
//非当前弧优化版 #include <iostream> #include <cstdio> #include <math.h> #include <cst ...
- Socket中SO_REUSEADDR简介
SO_REUSEADDR:字面意思重复使用地址 一般来说,一个端口释放后会等待两分钟之后才能再次被使用,SO_REUSEADDR是让端口释放后立即就可以被再次使用. SO_REUSEADDR用于对TC ...
- 商汤提出解偶检测中分类和定位分支的新方法TSD,COCO 51.2mAP | CVPR 2020
目前很多研究表明目标检测中的分类分支和定位分支存在较大的偏差,论文从sibling head改造入手,跳出常规的优化方向,提出TSD方法解决混合任务带来的内在冲突,从主干的proposal中学习不同的 ...
- Servlet --启动时创建、配置url、ServlectContext、初始化参数、获取资源
servlet的版本的区别 2.5版本, Servlet的配置只支持在xml文件中的配置 3.0版本: Servlet的配置支持在xml文件中的配置, 也可以使用注解的方式, 默认使用注解 让服务器在 ...
- Spring Boot Actuator H2 RCE复现
0x00 前言 Spring Boot框架是最流行的基于Java的微服务框架之一,可帮助开发人员快速轻松地部署Java应用程序,加快开发过程.当Spring Boot Actuator配置不当可能造成 ...
- 安卓commandlinetools-win-6200805_latest配置
JDK:1.8.0_251 系统:win10 64bit 问题1 官网下载commandlinetools,解压运行报错 解决方法 打开sdkmanager.bat,修改第17行为set DEFAUL ...
- P2764 最小路径覆盖问题 网络流重温
P2764 最小路径覆盖问题 这个题目之前第一次做的时候感觉很难,现在好多了,主要是二分图定理不太记得了,二分图定理 知道这个之后就很好写了,首先我们对每一个点进行拆点,拆完点之后就是跑最大流,求出最 ...
- IDEA的窗口布局设置
修改idea的窗口布局 idea默认的窗口模式是如: 可以通过File->Appearance->Window Options->勾选 Widescreen tool window ...
- ASP.Net Core中使用Swagger
我们先简单介绍下什么是Swagger,主要是用来干嘛?? 在Swagger诞生之前,我们通常在开发接口的过程中,需要前后端共同维护一个接口文档,然后大家按照接口文档的规范进行对接.接口文档俨然成了接口 ...
- 深入理解JS中的对象(二):new 的工作原理
目录 序言 不同返回值的构造函数 深入 new 调用函数原理 总结 参考 1.序言 在 深入理解JS中的对象(一):原型.原型链和构造函数 中,我们分析了JS中是否一切皆对象以及对象的原型.原型链和构 ...