I need to use thymeleaf instead of jsp in a SpringORM application, I'm looking for the configuration setting for this purpose.
create a simple spring boot project from https://start.spring.io/ and then add thymeleaf in your maven repository like below
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf-spring3</artifactId>
<version>3.0.11.RELEASE</version>
</dependency>
N.B: You can also chhose thymeleaf as a dependency when you create the project.
Related
I have a working vaadin-8 application. I want to migrate this application to vaadin-23.I have added dependencies related to vaadin-23
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin23.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
i am able to create views based on vaadin-23. But the problem is my vaadin-23 views with #Route annotation are not being used. I am not able to hit those urls from the browser. Do I need to create some servlet for vaadin-23 as I did for vaadin-8?
If the application is not using Spring check this example project for step by step migration from Vaadin 8 to Vaadin 14 running both apps at the same time in the same workspace. Scenario with Vaadin 23 should not be different regarding project setup. github.com/TatuLund/migrate-v8-to-v14/tree/master
But if you use Spring Boot, that is most likely the case. Both Vaadin versions require different version of the Spring add-ons, and those in turn define new scopes and there will be a clash.
In such case one can always deploy two different wars either on different context paths or different ports. Naturally you should keep the projects separated and use different IDE instance for each one. But if your requirement is to keep two apps running on the same server, so that it is easy to switch between them, it will work for that purpose.
I have a requirement to support swagger 2 & 3 in my spring boot API.
I have created swagger 2 using docket object & for swagger 3 just added maven dependency springdoc-openapi-ui. Able to check swagger 2 & 3 documentation.
how do I disable/enable only swagger 3 or swagger 2? I mean how do I disable swagger 3 configurations?
I don't have swagger 3 configuration class to enable/disable by using #profile. Just adding springdoc-openapi-ui maven dependency swagger 3 worked.
Here's the answer copied from this comment
The following property is available since: v1.1.16
springdoc.api-docs.enabled=false This property helps you disable
springdoc-openapi endpoints.
If you want to expose the api-docs endpoints without using the
swagger-ui, you can use the core dependency:
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-core</artifactId>
<version>1.1.16</version>
</dependency>
I have a grails project which uses jax-rs plugin with jersey and I would like use #JsonView described by http://wiki.fasterxml.com/JacksonJsonViews.
Actually, resources works but jsonview is not interpreted.
How I can do that ?
Does anybody know how to integrate Struts2 with Thymeleaf? I could not find any tutorial regarding integrating Struts2 and Thymeleaf.
I wrote a simple plugin that supports using Thymeleaf templates as the result type for Struts2 actions. The readme file contains examples of how to use the plug-in. You'll need to build the plug-in from source, as its not currently in any Maven repositories.
https://github.com/codework/struts2-thymeleaf-plugin
I am trying to follow this tutorial to create DropWizard views. However, when I try to addBundle(new ViewBundle()), it fails to find (or import) ViewBundle. What am I missing here?
The dependency dropwizard-views was missing in my maven pom file. Adding the dependency solved the issue.
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-views</artifactId>
<version>${dropwizard.version}</version>
</dependency>
You will need to choose one of the view template. As of writing, Dropwizard supports FreeMarker and Mustache. Instead of including dropwizard-view dependency, you should choose either dropwizard-views-mustache or dropwizard-views-freemarker, and dropwizard-view will be included as dependency.