相关疑难解决方法(0)

如何在windows中使用localhost上的端口杀死当前进程?

如何删除已分配给端口的当前进程/应用程序?

例如: localhost:8080

windows port cmd localhost command-prompt

363
推荐指数
20
解决办法
70万
查看次数

Spring Boot:无法访问localhost上的REST控制器(404)

我正在尝试在Spring Boot网站上调整REST控制器示例.不幸的是,当我尝试访问localhost:8080/itemURL 时,我遇到以下错误.

{
  "timestamp": 1436442596410,
  "status": 404,
  "error": "Not Found",
  "message": "No message available",
  "path": "/item"
}
Run Code Online (Sandbox Code Playgroud)

POM:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
   <groupId>SpringBootTest</groupId>
   <artifactId>SpringBootTest</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <properties>
      <javaVersion>1.8</javaVersion>
      <mainClassPackage>com.nice.application</mainClassPackage>
      <mainClass>${mainClassPackage}.InventoryApp</mainClass>
   </properties>

   <build>
      <plugins>
         <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
               <source>${javaVersion}</source>
               <target>${javaVersion}</target>
            </configuration>
         </plugin>

         <!-- Makes the Spring Boot app executable for a jar file. The additional configuration is needed for the cmd: mvn spring-boot:repackage 
            OR mvn spring-boot:run -->
         <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>

            <configuration>
               <mainClass>${mainClass}</mainClass>
               <layout>ZIP</layout>
            </configuration>
            <executions>
               <execution>
                  <goals> …
Run Code Online (Sandbox Code Playgroud)

java rest spring-boot

87
推荐指数
8
解决办法
15万
查看次数

System.Net.HttpListenerException:无法侦听前缀'http:// localhost:8080

我正在运行Scott Allen的ASP.Net Fundamentals课程中的以下代码

using System;
using Microsoft.Owin.Hosting;
using Owin;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string uri = "http://localhost:8080";
            using (WebApp.Start<Startup>(uri))
            {
                Console.WriteLine("Started!");
                Console.ReadKey();
                Console.WriteLine("Stopping!");
            }
        }
    }

    public class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            app.UseWelcomePage();
            //app.Run(
            //  ctx => ctx.Response.WriteAsync("Hello Owin!"));
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

但是,当我运行控制台应用程序时,我收到一条消息

    Unhandled Exception: System.Reflection.TargetInvocationException: Exception has
been thrown by the target of an invocation. ---> System.Net.HttpListenerExceptio
n: Failed to listen on prefix 'http://localhost:8080/' because it conflicts …
Run Code Online (Sandbox Code Playgroud)

port owin katana

20
推荐指数
1
解决办法
3万
查看次数

localhost:3000 在浏览器中不起作用

后端: Express 服务器,带有 npx create-express-api 后端

\n

前端:Next.js,带有 npx create-react-app 前端

\n

我已在根文件夹中实现了这些命令,并尝试运行 npm start xxx 来检查它们是否仍在工作。但他们没有在我的http://localhost:3000中工作\n尽管他们在这个链接中工作http://172.27.178.192:3000(在我的网络上)\n这是显示问题的图像

\n

我更换了浏览器,仍然出现同样的问题。在浏览器上显示\n无法连接\nFirefox 可以\xe2\x80\x99t 建立与 localhost:3000 处服务器的连接。

\n

javascript node.js npm express reactjs

8
推荐指数
2
解决办法
4万
查看次数

使用nodeJS关闭端口

我正在学习nodeJS。当我编写一个侦听端口的程序时,假设8081,然后编写另一个侦听同一端口的程序,我将得到以下类型的错误消息:

Error: listen EADDRINUSE
    at errnoException (net.js:901:11)
    at Server._listen2 (net.js:1039:14)
    at listen (net.js:1061:10)
    at Server.listen (net.js:1127:5)
    at Object.<anonymous> (C:\NetBeansWorkPlace\nodeJS_Files\TutsNodeJS\static_file_server.js:36:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
Run Code Online (Sandbox Code Playgroud)

我发现该端口正在使用中,但是如何清除该端口,或停止应用程序监听给定的端口?谢谢!世界银行

node.js

5
推荐指数
1
解决办法
6135
查看次数

如何关闭Windows 7中打开的端口?

当我尝试启动我的基于java的服务器时,有一条消息说该端口已经在使用......并且我的所有Java Web服务器都已停止...所以,如果有人可以帮助我,我会很感激...

java windows

4
推荐指数
2
解决办法
3万
查看次数