This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jdbc.driverClassName=com.mysql.jdbc.Driver | |
| jdbc.dialect=org.hibernate.dialect.MySQLDialect | |
| jdbc.databaseurl=jdbc:mysql://127.0.0.1:3306/test | |
| jdbc.username=root | |
| jdbc.password=password |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version='1.0' encoding='utf-8'?> | |
| <!DOCTYPE hibernate-configuration PUBLIC | |
| "-//Hibernate/Hibernate Configuration DTD//EN" | |
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> | |
| <hibernate-configuration> | |
| <session-factory> | |
| <mapping class="com.behindjava.entity.EmployeeEntity"></mapping> | |
| </session-factory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <beans xmlns="http://www.springframework.org/schema/beans" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns:aop="http://www.springframework.org/schema/aop" | |
| xmlns:context="http://www.springframework.org/schema/context" | |
| xmlns:jee="http://www.springframework.org/schema/jee" | |
| xmlns:lang="http://www.springframework.org/schema/lang" | |
| xmlns:p="http://www.springframework.org/schema/p" | |
| xmlns:tx="http://www.springframework.org/schema/tx" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xmlns="http://java.sun.com/xml/ns/javaee" | |
| xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
| id="WebApp_ID" version="2.5"> | |
| <display-name>Archetype Created Web Application</display-name> | |
| <welcome-file-list> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%@taglib uri="http://www.springframework.org/tags" prefix="spring"%> | |
| <%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%> | |
| <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> | |
| <html> | |
| <head> | |
| <title>Spring 3 hibernate integration example on www.behindjava.com</title> | |
| </head> | |
| <body> | |
| <h2>Employee Management Screen : Spring 3 hibernate integration example on www.behindjava.com</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.behindjava.controller; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.ui.ModelMap; | |
| import org.springframework.validation.BindingResult; | |
| import org.springframework.web.bind.annotation.ModelAttribute; | |
| import org.springframework.web.bind.annotation.PathVariable; | |
| import org.springframework.web.bind.annotation.RequestMapping; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.behindjava.service; | |
| import java.util.List; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Service; | |
| import org.springframework.transaction.annotation.Transactional; | |
| import com.behindjava.dao.EmployeeDAO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.behindjava.service; | |
| import java.util.List; | |
| import com.behindjava.entity.EmployeeEntity; | |
| public interface EmployeeManager { | |
| public void addEmployee(EmployeeEntity employee); | |
| public List<EmployeeEntity> getAllEmployees(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.behindjava.dao; | |
| import java.util.List; | |
| import org.hibernate.SessionFactory; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.stereotype.Repository; | |
| import com.howtodoinjava.entity.EmployeeEntity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.behindjava.dao; | |
| import java.util.List; | |
| import com.behindjava.entity.EmployeeEntity; | |
| public interface EmployeeDAO | |
| { | |
| public void addEmployee(EmployeeEntity employee); | |
| public List<EmployeeEntity> getAllEmployees(); |