Code Monkey home page Code Monkey logo

Comments (7)

Jixiangup avatar Jixiangup commented on June 9, 2024

你前后端分离启动的嘛?

from taier.

whiteS18 avatar whiteS18 commented on June 9, 2024

你前后端分离启动的嘛?

不是,只以debug模式启动了TaierApplication

from taier.

Jixiangup avatar Jixiangup commented on June 9, 2024

你前后端分离启动的嘛?

不是,只以debug模式启动了TaierApplication

因为在后面版本更新以后我们将路径重写了 你这个应该是吧前端资源移动到你的data-develop的resources下了对吧?

from taier.

whiteS18 avatar whiteS18 commented on June 9, 2024

你前后端分离启动的嘛?

不是,只以debug模式启动了TaierApplication

因为在后面版本更新以后我们将路径重写了 你这个应该是吧前端资源移动到你的data-develop的resources下了对吧?

在taier-data-develop/resource/static下面
图片

from taier.

Jixiangup avatar Jixiangup commented on June 9, 2024

你可以参考

public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/static/");
registry.addResourceHandler("/images/**").addResourceLocations("classpath:/static/images/");
registry.addResourceHandler("/assets/**").addResourceLocations("classpath:/static/assets/");
registry.addResourceHandler("swagger-ui.html").addResourceLocations(
"classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations(
"classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/taier/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
super.addResourceHandlers(registry);
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/taier/").setViewName("forward:/taier/index.html");
registry.addViewController("/").setViewName("forward:/taier/index.html");
}

同时 如果你把前端资源移动到data-develop以后 启动以后直接访问 $DATA-DEVELOP-HOST:$DATA-DEVELOP-PORT就可以访问到UI了

需要注意的是 这种方式每次前端改动都需要吧前端重新打包并且把前端资源内容dist文件移动到 data-develop 然后重启 data-develop

from taier.

Jixiangup avatar Jixiangup commented on June 9, 2024

如果还有问题请打开这个issue

from taier.

Jixiangup avatar Jixiangup commented on June 9, 2024

#260

from taier.

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.