<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197501#M150631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am working on an application where we are using Spring Boot and Activiti REST version 5.17.0 (using spring-boot-starter-rest-api).&amp;nbsp; As the application already has REST endpoints of its own, we would like to put the Activiti REST endpoints in a separate path, e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="http://www.example.com:1234/myAppNameHere/bpm-rest/repository/process-definitions/myProcess:1:6" rel="nofollow noopener noreferrer"&gt;www.example.com:1234/myAppNameHere/bpm-rest/repository/process-definitions/myProcess:1:6&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;&lt;A href="http://www.example.com:1234/myAppNameHere/bpm-rest/runtime/process-instances" rel="nofollow noopener noreferrer"&gt;www.example.com:1234/myAppNameHere/bpm-rest/runtime/process-instances&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;SPAN&gt;I want my existing REST endpoints to be unchanged, e.g. "&lt;/SPAN&gt;&lt;A href="http://www.example.com:1234/myAppNameHere/myResource/1234" rel="nofollow noopener noreferrer"&gt;www.example.com:1234/myAppNameHere/myResource/1234&lt;/A&gt;&lt;SPAN&gt;".&amp;nbsp; However, I cannot figure out how to configure this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to achieve this in another application using Activiti 5.14 with its Restlet functionality by configuring the web.xml file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;lt;servlet&amp;gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;servlet-name&amp;gt;RestletServlet&amp;lt;/servlet-name&amp;gt;&amp;nbsp; &lt;BR /&gt;&amp;nbsp; &amp;lt;servlet-class&amp;gt;org.restlet.ext.servlet.ServerServlet&amp;lt;/servlet-class&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;init-param&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-name&amp;gt;org.restlet.application&amp;lt;/param-name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;param-value&amp;gt;my.organization.appname.MyAppActivitiRestApplication&amp;lt;/param-value&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/init-param&amp;gt;&lt;BR /&gt;&amp;lt;/servlet&amp;gt;&lt;BR /&gt; &lt;BR /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;servlet-name&amp;gt;RestletServlet&amp;lt;/servlet-name&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;url-pattern&amp;gt;/bpm-rest/*&amp;lt;/url-pattern&amp;gt;&lt;BR /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;However, I am unsure how I would duplicate this functionality with the Spring Boot/Spring MVC configuration.&amp;nbsp; I asked a similar question a while back (&lt;/SPAN&gt;&lt;A href="http://forums.activiti.org/comment/26977" rel="nofollow noopener noreferrer"&gt;http://forums.activiti.org/comment/26977&lt;/A&gt;&lt;SPAN&gt;), when I was attempting to upgrade my other application to Activiti 5.16.4.&amp;nbsp; In that thread I was advised that I could change the servlet mapping "by overriding the WebConfigurer class".&amp;nbsp; However, I do not see a class with that name in either Activiti or Spring MVC.&amp;nbsp; There is one in Spring Boot under "org.springframework.boot.test", but I suspect that's not the one being referred to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In short, how do I configure the Activiti 5.17.0 Spring MVC REST endpoints to use a separate sub-path of my application from my application endpoints?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Feb 2015 16:38:18 GMT</pubDate>
    <dc:creator>mjustin</dc:creator>
    <dc:date>2015-02-05T16:38:18Z</dc:date>
    <item>
      <title>How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197501#M150631</link>
      <description>I am working on an application where we are using Spring Boot and Activiti REST version 5.17.0 (using spring-boot-starter-rest-api).&amp;nbsp; As the application already has REST endpoints of its own, we would like to put the Activiti REST endpoints in a separate path, e.g.www.example.com:1234/myAppNameHere/</description>
      <pubDate>Thu, 05 Feb 2015 16:38:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197501#M150631</guid>
      <dc:creator>mjustin</dc:creator>
      <dc:date>2015-02-05T16:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197502#M150632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The REST API request are handled by the Spring dispatcher servlet, so you just need to change the servlet mapping for this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The quickest way to do this is to add the following entry to your applications properties file:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;server.servletPath=/my_path/&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 11:10:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197502#M150632</guid>
      <dc:creator>jim1</dc:creator>
      <dc:date>2015-03-16T11:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197503#M150633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe this doesn't solve my problem, as won't this change all Spring MVC paths (including my own), and not just the REST API paths?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 14:57:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197503#M150633</guid>
      <dc:creator>mjustin</dc:creator>
      <dc:date>2015-03-16T14:57:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197504#M150634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One option is to have a custom DispatcherServletCOnfiguration (like we have in activiti-rest-webapp) that you map onto a different url&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Mar 2015 09:38:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197504#M150634</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-03-17T09:38:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the Spring MVC servlet mapping for only the Activiti REST endpoints?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197505#M150635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@jarrez I have this same use case, could you elaborate on your proposed solution?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've looked at the DispatcherServletConfiguration in the rest module but I don't see how I would use it to add a prefix to the activiti rest endpoints. I see that you are providing your own RequestMappingHandlerMapping object but it appears to collect all @RequestMapping methods not just the Activiti ones. Even if I could filter the mappings to just the Activiti mappings how would I map them to a different path prefix?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for any help you can give&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2016 15:20:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-do-i-change-the-spring-mvc-servlet-mapping-for-only-the/m-p/197505#M150635</guid>
      <dc:creator>raedius</dc:creator>
      <dc:date>2016-09-16T15:20:25Z</dc:date>
    </item>
  </channel>
</rss>

