Skip to content

Commit

Permalink
Closes #68
Browse files Browse the repository at this point in the history
  • Loading branch information
axholo committed Dec 31, 2019
1 parent db88a2e commit 4c2e944
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 427 deletions.
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -70,7 +72,7 @@
<jersey.version>2.29.1</jersey.version>

<!-- Resteasy -->
<resteasy.version>3.9.3.Final</resteasy.version>
<resteasy.version>4.4.2.Final</resteasy.version>

<!-- Swagger V2 -->
<swagger.v2.version>1.6.0</swagger.v2.version>
Expand Down
6 changes: 4 additions & 2 deletions spring-boot-resteasy/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand Down Expand Up @@ -54,7 +56,7 @@
<!-- Resteasy -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<artifactId>resteasy-core</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,26 +60,31 @@
import com.holonplatform.jaxrs.spring.boot.resteasy.internal.ResteasyBootstrapListener;

/**
* Spring boot auto configuration to setup Resteasy using a {@link ResteasyConfig} JAX-RS Application bean and
* automatically register any JAX-RS resource which is declared as a Spring bean, such as {@link Path} and
* Spring boot auto configuration to setup Resteasy using a
* {@link ResteasyConfig} JAX-RS Application bean and automatically register any
* JAX-RS resource which is declared as a Spring bean, such as {@link Path} and
* {@link Provider} annotated beans.
*
* <p>
* If a {@link ResteasyConfig} bean is not provided in Spring context, a default one will be created and registered
* automatically. You can use {@link ResteasyConfig} class to explicitly register JAX-RS endpoint/provider classes,
* singleton resources and configuration properties.
* If a {@link ResteasyConfig} bean is not provided in Spring context, a default
* one will be created and registered automatically. You can use
* {@link ResteasyConfig} class to explicitly register JAX-RS endpoint/provider
* classes, singleton resources and configuration properties.
* </p>
*
* <p>
* The {@link ResteasyConfigCustomizer} interface can be used to customize application resources registration. Any
* Spring bean which implements such interface is automatically detected and the
* The {@link ResteasyConfigCustomizer} interface can be used to customize
* application resources registration. Any Spring bean which implements such
* interface is automatically detected and the
* {@link ResteasyConfigCustomizer#customize(ResteasyConfig)} method is invoked.
* </p>
*
* <p>
* The Resteasy JAX-RS application path can be defined either using the {@link ApplicationPath} annotation on the
* {@link ResteasyConfig} bean class or through the <code>holon.resteasy.application-path</code> configuration property.
* See {@link ResteasyConfigurationProperties} for a list of available configuration properties.
* The Resteasy JAX-RS application path can be defined either using the
* {@link ApplicationPath} annotation on the {@link ResteasyConfig} bean class
* or through the <code>holon.resteasy.application-path</code> configuration
* property. See {@link ResteasyConfigurationProperties} for a list of available
* configuration properties.
* </p>
*
* @since 5.0.0
Expand Down Expand Up @@ -134,7 +139,7 @@ private void customize() {

@Bean
public static SpringBeanProcessor resteasySpringBeanProcessor() {
final ResteasyProviderFactory resteasyProviderFactory = new ResteasyProviderFactory();
final ResteasyProviderFactory resteasyProviderFactory = ResteasyProviderFactory.getInstance();
final ResourceMethodRegistry resourceMethodRegistry = new ResourceMethodRegistry(resteasyProviderFactory);

SpringBeanProcessor springBeanProcessor = new SpringBeanProcessor();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
import javax.servlet.ServletContextListener;

import org.jboss.resteasy.core.AsynchronousDispatcher;
import org.jboss.resteasy.core.Dispatcher;
import org.jboss.resteasy.core.ResourceMethodRegistry;
import org.jboss.resteasy.core.SynchronousDispatcher;
import org.jboss.resteasy.plugins.server.servlet.ListenerBootstrap;
import org.jboss.resteasy.plugins.spring.SpringBeanProcessor;
import org.jboss.resteasy.spi.Dispatcher;
import org.jboss.resteasy.spi.Registry;
import org.jboss.resteasy.spi.ResteasyDeployment;
import org.jboss.resteasy.spi.ResteasyProviderFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ public void testEndpoint() {
@SuppressWarnings("resource")
@Test
public void testOpenApi() {
final Client client = new ResteasyClientBuilder().build();
final Client client = ResteasyClientBuilder.newClient();

// json
Response response = client.target("http://localhost:" + port).path("api-docs").queryParam("type", "json")
.request().get();
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void testEndpoint() {
@SuppressWarnings("resource")
@Test
public void testOpenApi() {
final Client client = new ResteasyClientBuilder().build();
final Client client = ResteasyClientBuilder.newClient();
// json
Response response = client.target("http://localhost:" + port).path("api-docs").queryParam("type", "json")
.request().get();
Expand Down
Loading

0 comments on commit 4c2e944

Please sign in to comment.