Git Product home page Git Product logo

Comments (5)

figozhu avatar figozhu commented on August 16, 2024 1

谢谢!,已经搞定。

---原始邮件--- 发件人: "czx"[email protected] 发送时间: 2019年5月27日(星期一) 晚上8:24 收件人: "yzcheng90/X-SpringBoot"[email protected]; 抄送: "Author"[email protected];"xuanyuan1hao"[email protected]; 主题: Re: [yzcheng90/X-SpringBoot] swagger-ui上面的接口测试会发生跨域问题 (#5) 项目中有一个hello接口 测试 是没有问题的,还有就是 你可以在Swagger2 配置类中指定请求的host 为ip 或域名 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

这种恶习真是讨厌,一句话“已经搞定”,怎么搞定的就是不说,不能让后来人分享你成功的经验吗?

from x-springboot.

xuanyuan1hao avatar xuanyuan1hao commented on August 16, 2024

nginx启动的是80端口,项目启动的是8080端口,swagger访问的服务是8080端口,所以会跨域,我看了在springboot的filter已经处理了跨域,但是浏览器chrome一样报错。返回内容为空。

from x-springboot.

yzcheng90 avatar yzcheng90 commented on August 16, 2024

项目中有一个hello接口 测试 是没有问题的,还有就是 你可以在Swagger2 配置类中指定请求的host 为ip 或域名

from x-springboot.

xuanyuan1hao avatar xuanyuan1hao commented on August 16, 2024

from x-springboot.

qixianchuan avatar qixianchuan commented on August 16, 2024

我也遇到了这个问题,请问您是怎么解决的?

from x-springboot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.