跟着拉大锯大神学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> 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

跟着拉大锯大神学Android——网络编程中运行后台服务器端口占用问题_第1张图片

2.找到对应的端口对应的PID 输入指令找到对应的进程

tasklist | findstr "16704"

跟着拉大锯大神学Android——网络编程中运行后台服务器端口占用问题_第2张图片

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> 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——网络编程中运行后台服务器端口占用问题)