Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Spring Boot 2 + SmartGwt

    I would like to know if it possible to integrate SmartGwt with Spring Boot 2 and build a standalone WAR/JAR?
    Currently we use SmartGWT Power 3.1.

    #2
    Yes, the SmartGWT server is just ordinary Java libraries, so this all works. Things to note:

    1. if you are using just jar-based deployment (no war) then you need to jar up the files that are normally part of a SmartGWT war, especially all the assets under the "isomorphic/" directory

    2. with a .jar only deployment, there is no web.xml, so you to register servlets via Spring's Beans and annotations style. It looks like this:

    Code:
       
       @Bean
        ServletRegistrationBean<IsomorphicAuthIDACall> iscIDACallServlet() {
            ServletRegistrationBean<IsomorphicAuthIDACall> srb = new ServletRegistrationBean<>(
                    new IsomorphicAuthIDACall(),
                    "api/isomorphic/IDACall/*");
            srb.setName("IsomorphicAuthIDACall");
            return srb;
        }
    This is just an example, not runnable code (it shows a subclass created in another project). Refer to Spring docs on servlet registration.

    3. your version of the product is well past end-of-life (it was released 8.5 years ago), you need to upgrade

    4. people are often excited to use Spring Boot because it makes it easy to create new endpoints, but, the approach of manually creating endpoints for CRUD operations was obsoleted 20 years ago. Do not create endpoints for DataSource operations. Just use the provided servlets.

    Comment


      #3
      I m upgrading and old app to Spring boot 2.

      When I create a servlet

      Code:
      import com.isomorphic.base.Init;
      
      
      @Bean
      public ServletRegistrationBean InitRegistration(){
      
      ServletRegistrationBean bean = new ServletRegistrationBean( new Init());
      bean.setLoadOnStartup(1);
      
      return bean;
      
      }
      The app respond Http code 405. If I remove this part of code and keep only registration of RpcPingServlet, IDACall, DataSourceLoaderRegistration the app respond properly, but DataSource is not working. Also I have upgraded smartgwt version to 5.0-p20191109.
      Last edited by 9thwonder; 1st Feb 2021, 21:51.

      Comment


        #4
        We'e not sure why you would update from a version of SmartGWT that is 8.5 years to a 6.5 years old and also past end of life... ?

        Our software does not send 405 errors, so, you have a problem with some other software, not SmartGWT.

        If you're looking for help from Isomorphic:

        1. update to the latest - we do not support new development on obsolete versions

        2. let us know if there is a problem with our software, with instructions to reproduce the problem

        3. purchase support or consulting hours, or let us know which supported customer you are working from, instead of posting from an anonymous email account

        Comment

        Working...
        X