Giter Club home page Giter Club logo

Comments (9)

rgrebski avatar rgrebski commented on June 27, 2024

Has that been fixed ? I can still see classpath scanning in 2.0.1-RELEASE.

[UPDATE]
Ok I see in ResteasyEmbeddedServletInitializer:83

applications = reflections.getSubTypesOf(Application.class);

Any way to provide Application class in a static way ?

from resteasy-spring-boot.

fabiocarvalho777 avatar fabiocarvalho777 commented on June 27, 2024

Yes, it has been fixed. JAX-RS resource and provider classes are not scanned anymore, they are only registered when they are Spring beans. However, notice that JAX-RS ApplicationPath annotated classes, which are also sub-classes of JAX-RS Application class, are still scanned, because they are not mean to be Spring beans. That is how it works in regular RESTEasy with Spring integration, but without Spring Boot, so we are keeping it consistent to that. So, the only scanning activity you will see is for Application sub-classes, not for resources nor providers classes.

In the future, we will probably add a feature where it is possible to configure the starter to not scan searching for JAX-RS Application classes neither, and have an alternative way to identify them, which could be for example by manually setting a property, or by having them as Spring beans as well.

Let me know your thoughts about all of this, or if you have any other question, your feedback is appreciated.

from resteasy-spring-boot.

fabiocarvalho777 avatar fabiocarvalho777 commented on June 27, 2024

One more thing. I have just opened this new feature request here. Is that something you are looking for?

from resteasy-spring-boot.

rgrebski avatar rgrebski commented on June 27, 2024

Thx, this is exactly what I am looking for.
If you need help, let me know, I would be happy to contribute.

from resteasy-spring-boot.

fabiocarvalho777 avatar fabiocarvalho777 commented on June 27, 2024

Thanks Radek!! I am going to work on it today and release a new version with it. I will let you know when it is ready.

from resteasy-spring-boot.

fabiocarvalho777 avatar fabiocarvalho777 commented on June 27, 2024

Hey Radek, issue #22 has been finished. It is already available via version 2.1.0-SNAPSHOT. Read this section to know how to use. I am going to work on one or more issue and then release version 2.1.0, hopefully that will be done by the end of this week. Let me know if you have any question or comment.

from resteasy-spring-boot.

fabiocarvalho777 avatar fabiocarvalho777 commented on June 27, 2024

@rgrebski version 2.1.0 has just been released, and it contains #22

from resteasy-spring-boot.

rgrebski avatar rgrebski commented on June 27, 2024

Thanks a lot ! Im gonna use it next week once Im back from holiday!

from resteasy-spring-boot.

rgrebski avatar rgrebski commented on June 27, 2024

Thanks again, works like a charm. Before the fix when I tried running from .jar (java -jar my-spring-boot-app.jar) it could not find RestEasy Application class, but now I registered it as a Spring bean and works just perfect

from resteasy-spring-boot.

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.