general cleanup and improvements
This commit is contained in:
parent
6d68242ff7
commit
044e6a3312
|
@ -7,7 +7,6 @@
|
|||
</configSuffixes>
|
||||
<enableImports><![CDATA[false]]></enableImports>
|
||||
<configs>
|
||||
<config>src/main/webapp/WEB-INF/mvc-servlet.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
</configSets>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
package org.baeldung.persistence.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
package org.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
|
@ -0,0 +1,7 @@
|
|||
package org.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
|
||||
public interface IFooDao extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
package org.baeldung.persistence.dao;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.model;
|
||||
package org.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package org.baeldung.spring.persistence.service;
|
||||
package org.baeldung.persistence.service;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IFooDao;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.persistence.dao.IFooDao;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.config;
|
||||
package org.baeldung.spring;
|
||||
|
||||
import java.util.Properties;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.config;
|
||||
package org.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.ImportResource;
|
|
@ -1,7 +0,0 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
|
||||
public interface IFooDao extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" >
|
||||
|
||||
</beans>
|
|
@ -1,17 +1,18 @@
|
|||
<?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_3_0.xsd" id="WebApp_ID" version="3.0">
|
||||
<display-name>Spring MVC Application</display-name>
|
||||
<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>
|
||||
<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_3_0.xsd" id="WebApp_ID" version="3.0">
|
||||
<display-name>Spring Hibernate 3 Application</display-name>
|
||||
<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>
|
||||
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
||||
</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring.persistence.config</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
</web-app>
|
|
@ -2,8 +2,9 @@ package org.baeldung.spring.persistence.service;
|
|||
|
||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
||||
|
||||
import org.baeldung.spring.persistence.config.PersistenceConfig;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.persistence.service.FooService;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
</configSuffixes>
|
||||
<enableImports><![CDATA[false]]></enableImports>
|
||||
<configs>
|
||||
<config>src/main/webapp/WEB-INF/mvc-servlet.xml</config>
|
||||
</configs>
|
||||
<configSets>
|
||||
</configSets>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Child;
|
||||
|
||||
public interface IChildDao extends IOperations<Child> {
|
||||
//
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
|
||||
public interface IFooDao extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Parent;
|
||||
|
||||
public interface IParentDao extends IOperations<Parent> {
|
||||
//
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.dao.common;
|
||||
package org.baeldung.persistence.dao.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.dao.common;
|
||||
package org.baeldung.persistence.dao.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.spring.persistence.dao.impl;
|
||||
package org.baeldung.persistence.dao.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IChildDao;
|
||||
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.spring.persistence.model.Child;
|
||||
import org.baeldung.persistence.dao.IChildDao;
|
||||
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.persistence.model.Child;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.spring.persistence.dao.impl;
|
||||
package org.baeldung.persistence.dao.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IFooDao;
|
||||
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.persistence.dao.IFooDao;
|
||||
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.spring.persistence.dao.impl;
|
||||
package org.baeldung.persistence.dao.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IParentDao;
|
||||
import org.baeldung.spring.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.spring.persistence.model.Parent;
|
||||
import org.baeldung.persistence.dao.IParentDao;
|
||||
import org.baeldung.persistence.dao.common.AbstractHibernateDao;
|
||||
import org.baeldung.persistence.model.Parent;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.model;
|
||||
package org.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.model;
|
||||
package org.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.model;
|
||||
package org.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.service;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Child;
|
||||
|
||||
public interface IChildService extends IOperations<Child> {
|
||||
//
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.service;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
|
||||
public interface IFooService extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package org.baeldung.persistence.service;
|
||||
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Parent;
|
||||
|
||||
public interface IParentService extends IOperations<Parent> {
|
||||
//
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.spring.persistence.service.common;
|
||||
package org.baeldung.persistence.service.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Transactional
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.spring.persistence.service.impl;
|
||||
package org.baeldung.persistence.service.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IChildDao;
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Child;
|
||||
import org.baeldung.spring.persistence.service.IChildService;
|
||||
import org.baeldung.spring.persistence.service.common.AbstractService;
|
||||
import org.baeldung.persistence.dao.IChildDao;
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Child;
|
||||
import org.baeldung.persistence.service.IChildService;
|
||||
import org.baeldung.persistence.service.common.AbstractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.spring.persistence.service.impl;
|
||||
package org.baeldung.persistence.service.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IFooDao;
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.spring.persistence.service.IFooService;
|
||||
import org.baeldung.spring.persistence.service.common.AbstractService;
|
||||
import org.baeldung.persistence.dao.IFooDao;
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.persistence.service.IFooService;
|
||||
import org.baeldung.persistence.service.common.AbstractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.spring.persistence.service.impl;
|
||||
package org.baeldung.persistence.service.impl;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.IParentDao;
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Parent;
|
||||
import org.baeldung.spring.persistence.service.IParentService;
|
||||
import org.baeldung.spring.persistence.service.common.AbstractService;
|
||||
import org.baeldung.persistence.dao.IParentDao;
|
||||
import org.baeldung.persistence.dao.common.IOperations;
|
||||
import org.baeldung.persistence.model.Parent;
|
||||
import org.baeldung.persistence.service.IParentService;
|
||||
import org.baeldung.persistence.service.common.AbstractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.config;
|
||||
package org.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.persistence.config;
|
||||
package org.baeldung.spring;
|
||||
|
||||
import java.util.Properties;
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Child;
|
||||
|
||||
public interface IChildDao extends IOperations<Child> {
|
||||
//
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
|
||||
public interface IFooDao extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.dao;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Parent;
|
||||
|
||||
public interface IParentDao extends IOperations<Parent> {
|
||||
//
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.service;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Child;
|
||||
|
||||
public interface IChildService extends IOperations<Child> {
|
||||
//
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.service;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
|
||||
public interface IFooService extends IOperations<Foo> {
|
||||
//
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
package org.baeldung.spring.persistence.service;
|
||||
|
||||
import org.baeldung.spring.persistence.dao.common.IOperations;
|
||||
import org.baeldung.spring.persistence.model.Parent;
|
||||
|
||||
public interface IParentService extends IOperations<Parent> {
|
||||
//
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd" >
|
||||
|
||||
</beans>
|
|
@ -1,7 +0,0 @@
|
|||
<html>
|
||||
<head></head>
|
||||
|
||||
<body>
|
||||
<h1>This is the body of the sample view</h1>
|
||||
</body>
|
||||
</html>
|
|
@ -1,17 +1,18 @@
|
|||
<?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_3_0.xsd" id="WebApp_ID" version="3.0">
|
||||
<display-name>Spring MVC Application</display-name>
|
||||
<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>
|
||||
<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_3_0.xsd" id="WebApp_ID" version="3.0">
|
||||
<display-name>Spring Hibernate 4 Application</display-name>
|
||||
<context-param>
|
||||
<param-name>contextClass</param-name>
|
||||
<param-value>
|
||||
org.springframework.web.context.support.AnnotationConfigWebApplicationContext
|
||||
</param-value>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring.persistence.config</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring</param-value>
|
||||
</context-param>
|
||||
<listener>
|
||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||
</listener>
|
||||
</web-app>
|
|
@ -2,8 +2,9 @@ package org.baeldung.spring.persistence.service;
|
|||
|
||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
||||
|
||||
import org.baeldung.spring.persistence.config.PersistenceConfig;
|
||||
import org.baeldung.spring.persistence.model.Foo;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.persistence.service.IFooService;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package org.baeldung.spring.persistence.service;
|
||||
|
||||
import org.baeldung.spring.persistence.config.PersistenceConfig;
|
||||
import org.baeldung.spring.persistence.model.Child;
|
||||
import org.baeldung.spring.persistence.model.Parent;
|
||||
import org.baeldung.persistence.model.Child;
|
||||
import org.baeldung.persistence.model.Parent;
|
||||
import org.baeldung.persistence.service.IChildService;
|
||||
import org.baeldung.persistence.service.IParentService;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
|
Loading…
Reference in New Issue