Git Product home page Git Product logo

resteasy-spring-boot's Introduction

RESTEasy

Github CI

RESTEasy is a JBoss.org project aimed at providing productivity frameworks for developing client and server RESTful applications and services in Java. It is mainly a Jakarta RESTful Web Services implementation but you'll find some other experimental code in the repository.

The project page can be found at https://resteasy.dev.

Jakarta RESTful Web Services

RESTEasy is a JBoss project that provides various frameworks to help you build RESTful Web Services and RESTful Java applications. It is a portable implementation of the Jakarta RESTful Web Services specification. The Jakarta RESTful Web Services provides a Java API for RESTful Web Services over the HTTP protocol. Please note that the specification is now under the Jakarta EE Project. You can read the entire specification at Jakarta RESTful Web Services.

Getting started with RESTEasy

Documentation

To read the documentation you can read it online.

Issues

Issues are kept in JIRA.

Build

Currently, RESTEasy requires JDK 11+.

If you want to build the project without running the tests, you need to pull down a clone of the RESTEasy repository and run:

$ ./mvnw clean install -DskipTests=true

If you want to build the project with testings run, you may need to specify a profile to use, and may need to configure the WildFly version you want to run the tests with. Here is an example:

$ SERVER_VERSION=27.0.0.Final ./mvnw clean -fae -Dserver.version=$SERVER_VERSION install

Contribute

You are most welcome to contribute to RESTEasy!

Read the Contribution guidelines

resteasy-spring-boot's People

Contributors

abdelhadinaimi avatar asoldano avatar aspan avatar awood avatar dependabot[bot] avatar fabiocarvalho777 avatar geoand avatar jamezp avatar jens-meiss avatar kahowell avatar lalifk avatar lcybo avatar liweinan avatar metacosm avatar mswiderski avatar rsearls avatar sharathkuncham avatar sharathsrinivasa avatar zregvart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

resteasy-spring-boot's Issues

Unable to use resteasy-spring-boot-starter 6.0.0.Alpha1

Yes, I know its an Alpha version, may or may not work. Just want to raise if incase unnoticed

I am unable to use following dependency.

<dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-spring-boot-starter</artifactId>
    <version>6.0.0.Alpha1</version>
</dependency>

Because I see pom.xml has relative path for parent pom.xml 'resteasy-spring-boot-starter-parent' which is not included in the above package.

Error:

Failed to read artifact descriptor for org.jboss.resteasy:resteasy-spring-boot-starter:jar:6.0.0.Alpha1: Could not find artifact org.jboss.resteasy:resteasy-spring-boot-starter-parent:pom:6.0.0.Alpha1 in *** (https://pkgs.dev.azure.com/*********/maven/v1) -> [Help 1]

Is dependency Guava required in starter?

The resteasy-spring-boot-starter pom.xml declares a dependency to Guava:

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>

Right now Guava will be packaged as a transitive dependency for any project using the starter.

I wonder if Guava is required for the starter or can be removed.
As a test I removed the Guava dependency from the starter's pom.xml and haven't noticed any issues when running mvn verify.

Can you clarify why Guava is declared here?
Thanks!

How to integrate with Spring boot actuator?

I am using this starter to expose JAX-RS resources.
Now I want to integrate Spring boot Actuator
Simply, I insert the dependency in my build.gradle

Dependency
implementation 'org.springframework.boot:spring-boot-starter-actuator'.

LOGS
INFO 1386771 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'.
But I can't access it.

Is there any alternative to access these endpoints without having to migrate to Jersey?

getClasses() and getSingletones() not called (version 6.0.0.Final and resteasy 6.2.1.Final)

digging further i think i found the issue:

public class ResteasyApplicationBuilder {

	public static final String BEAN_NAME = "JaxrsApplicationServletBuilder";

	private static final Logger logger = LoggerFactory.getLogger(ResteasyApplicationBuilder.class);

	public ServletRegistrationBean build(String applicationClassName, String path, Set<Class<?>> resources, Set<Class<?>> providers) {
		Servlet servlet = new HttpServlet30Dispatcher();

		ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean(servlet);

		servletRegistrationBean.setName(applicationClassName);
		servletRegistrationBean.setLoadOnStartup(1);
		servletRegistrationBean.setAsyncSupported(true);
		servletRegistrationBean.addInitParameter(Application.class.getTypeName(), applicationClassName);

notice this line specifically:
servletRegistrationBean.addInitParameter(Application.class.getTypeName(), applicationClassName);

now look at the ServletContainerDispatcher code from resteasy core

public void init(ServletContext servletContext, ConfigurationBootstrap bootstrap, HttpRequestFactory requestFactory, HttpResponseFactory responseFactory) throws ServletException {
      this.requestFactory = requestFactory;
      this.responseFactory = responseFactory;
      ResteasyDeployment ctxDeployment = (ResteasyDeployment)servletContext.getAttribute(ResteasyDeployment.class.getName());
      ResteasyProviderFactory globalFactory = (ResteasyProviderFactory)servletContext.getAttribute(ResteasyProviderFactory.class.getName());
      if (globalFactory == null && ctxDeployment != null) {
          globalFactory = ctxDeployment.getProviderFactory();
      }

      Dispatcher globalDispatcher = (Dispatcher)servletContext.getAttribute(Dispatcher.class.getName());
      if (globalDispatcher == null && ctxDeployment != null) {
          globalDispatcher = ctxDeployment.getDispatcher();
      }

      String application = bootstrap.getInitParameter("jakarta.ws.rs.Application");

specifically

String application = bootstrap.getInitParameter("jakarta.ws.rs.Application");
while Application.class resolves to jakarta.ws.rs.core.Application causing application to allways be null

this matters because later in the ServletContainerDispatcher code we check if application is not null ,in this case we call process application which in turn calls getClasses and getSingletons

not sure if the fix should be in this repo or in the resteasy core repo

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.