Git Product home page Git Product logo

Comments (5)

sonus21 avatar sonus21 commented on August 19, 2024

@scotty6435 which version of Rqueue, you're using? AFAIR, once you set rqueue.web.url.prefix, it should work without changing any code. Please let me know if you find its other way around.

from rqueue.

scotty6435 avatar scotty6435 commented on August 19, 2024

@sonus21 The dashboard page has documentation on the necessary ResourceHandlerRegistry needed when the path config is added. I've checked and confirmed that without this, the generated paths are correct but the static resources are only available on the /rqueue/ root not the custom one.

from rqueue.

sonus21 avatar sonus21 commented on August 19, 2024

Which version of Rqueue you're using?

<link href="{{urlPrefix}}rqueue/img/favicon.ico" rel="shortcut icon">

model.addAttribute("urlPrefix", rqueueWebConfig.getUrlPrefix(xForwardedPrefix));

return HttpUtils.joinPath(xForwardedPrefix, servletContextPath, urlPrefix);

These lines suggest it should be generating correct path.

Screenshot 2023-10-04 at 7 11 44 PM Screenshot 2023-10-04 at 7 11 50 PM

This is my MVC config, and its working perfectly fine.

@EnableWebMvc
@Configuration
public class MvcConfig implements WebMvcConfigurer {

  @Value("${rqueue.web.url.prefix:}")
  private String rqueueWebUrlPrefix;

  @Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
    if (!registry.hasMappingForPattern("/webjars/**")) {
      registry
          .addResourceHandler("/webjars/**")
          .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
    if (!StringUtils.isEmpty(rqueueWebUrlPrefix)) {
      registry
          .addResourceHandler(rqueueWebUrlPrefix + "**")
          .addResourceLocations("classpath:/public/");
    }
    if (!registry.hasMappingForPattern("/**")) {
      registry.addResourceHandler("/**").addResourceLocations("classpath:/public/");
    }
  }
}

MVC config can't be added by Rqueue as Rqueue does not control the MVC configurer class.

from rqueue.

scotty6435 avatar scotty6435 commented on August 19, 2024

I'm now using 3.1.0 however I'm still getting a failure:
image
image

You included a code snippet of 'your config' but in your first comment you said that no configuration is needed beyond the rqueue.web.url.prefix property. If I add my own configuration file like you have above, it works for me also. I was asking whether this could be integrated into the project so that it did not have to be managed independently by anyone looking to change prefix paths.

from rqueue.

sonus21 avatar sonus21 commented on August 19, 2024

Oh! I see no, we have to add this manually as this can not be controlled by Rqueue and its even have no idea whether any configs are there or not.

from rqueue.

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.