entityList = accountManager.getAllUser();
return BeanMapper.mapList(entityList, UserDTO.class);
} catch (RuntimeException e) {
throw WebExceptionFactory.buildDefaultException(e, logger);
@@ -72,7 +72,7 @@ public class UserResourceService {
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML + WsConstants.CHARSET })
public UserDTO getUser(@PathParam("id") Long id) {
try {
- User entity = accountManager.getInitializedUser(id);
+ User entity = accountManager.getUserEffective(id);
return BeanMapper.map(entity, UserDTO.class);
} catch (ObjectNotFoundException e) {
String message = "用户不存在(id:" + id + ")";
@@ -93,7 +93,7 @@ public class UserResourceService {
public Response searchUser(@QueryParam("name") String name,
@QueryParam("format") @DefaultValue("json") String format) {
try {
- User entity = accountManager.searchInitializedUserByName(name);
+ User entity = accountManager.findUserByNameInitialized(name);
if ("html".equals(format)) {
//返回html格式的特定字符串.
String html = "" + entity.getName() + ", your mother call you...
";
diff --git a/examples/showcase/src/main/resources/META-INF/orm.xml b/examples/showcase/src/main/resources/META-INF/orm.xml
new file mode 100644
index 00000000..9a2e1d95
--- /dev/null
+++ b/examples/showcase/src/main/resources/META-INF/orm.xml
@@ -0,0 +1,4 @@
+
+
+
\ No newline at end of file
diff --git a/examples/showcase/src/main/resources/META-INF/persistence.xml b/examples/showcase/src/main/resources/META-INF/persistence.xml
new file mode 100644
index 00000000..e6d6e1d7
--- /dev/null
+++ b/examples/showcase/src/main/resources/META-INF/persistence.xml
@@ -0,0 +1,8 @@
+
+
+
+
+ META-INF/orm.xml
+
+
\ No newline at end of file
diff --git a/examples/showcase/src/main/resources/applicationContext.xml b/examples/showcase/src/main/resources/applicationContext.xml
index ccc161aa..180eaf7b 100644
--- a/examples/showcase/src/main/resources/applicationContext.xml
+++ b/examples/showcase/src/main/resources/applicationContext.xml
@@ -1,11 +1,13 @@
Spring公共配置
@@ -15,20 +17,26 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
${hibernate.dialect}
+ org.hibernate.cache.EhCacheProvider
+ ehcache/ehcache-hibernate-local.xml
+ org.hibernate.cfg.ImprovedNamingStrategy
-
+
+
+
+
+
@@ -36,9 +44,9 @@
-
-
-
+
+
+
@@ -86,7 +94,6 @@
-
@@ -135,5 +142,4 @@
-