Category: Spring Technologies

Java based configuration – Spring MVC Hibernate Integration

Working Example : https://github.com/teachkoka/spring-mvc-javaconfig POM.XML   <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mvchib</groupId> <artifactId>spring</artifactId> <packaging>war</packaging> <version>0.0.1-SNAPSHOT</version> <properties> <hibernate.version>4.2.0.Final</hibernate.version> <mysql.connector.version>5.1.21</mysql.connector.version> <spring.version>3.2.2.RELEASE</spring.version> </properties> <dependencies> <!– DB related dependencies –> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> <version>9.3-1100-jdbc4</version> […]

SpringBoot Setup

POM.XML <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.3.2.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!– tag::actuator[] –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <!– end::actuator[] –> <!– tag::tests[] –> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!– […]

CRUD Operations – BootStrap + SpringMVC + Hibernate

POM.XML   <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.springapp</groupId> <artifactId>bellinfo-spring-mvc-project</artifactId> <packaging>war</packaging> <version>1.0-SNAPSHOT</version> <name>bellinfo-spring-mvc-project</name> <properties> <spring.version>4.1.1.RELEASE</spring.version> <hibernate.version>4.3.2.Final</hibernate.version> <apache.tiles.version>3.0.5</apache.tiles.version> </properties> <dependencies> <!– Javax Modules –> <dependency> <groupId>jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>javax.validation</groupId> […]

Spring Tiles

Working sample: https://github.com/teachkoka/spring-tiles   mvc-dispatcher-servlet.xml <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"> <property name="order" value="0"/> <property name="viewClass"> <value> org.springframework.web.servlet.view.tiles3.TilesView </value> </property> </bean> <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"> <property name="definitions"> <list> <value>/WEB-INF/tiles.xml</value> </list> </property> </bean> tiles.xml <?xml version="1.0" […]