- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有没有办法从(Oracle)数据库中提取blob文件并将其传递给spring MVC中的 Controller 而不使用hibernate?
以下是我的表结构:
desc PROJECT_STORAGE;
PROJECT_ID NUMBER(38)
FILE_NAME VARCHAR2(20)
DOCUMENTS BLOB
ALIAS VARCHAR2(50)
FILE_TYPE VARCHAR2(50)
我现在的代码如下:
@RequestMapping(value = "/DownloadFile.htm", method = RequestMethod.GET)
@ResponseBody
public void downloadFile(ModelMap model,HttpServletRequest request,HttpServletResponse response,@RequestParam Map<String,String> parameters) {
Object objArray2[]=new Objec
Map<String,Object> file=user.getById(objArray2, "select * from project_storage WHERE PROJECT_ID = 63 ");
log.info("The record retrieved is : "+file); //The record retrieved is : {PROJECT_ID=63, FILE_NAME=MAT.png, DOCUMENTS=[B@1edef76, ALIAS=null, FILE_TYPE=image/png}
try
{File file2=(File)file.get("DOCUMENTS"); //ClassCastException occurs here
response.setHeader("Content-Disposition", "attachment;filename=\"test\"");
response.setContentType("image/*");
response.setHeader("Cache-Control", "cache, must-revalidate");
response.setHeader("cache-control", "no-cache");
response.setHeader("Pragma", "public");
response.setHeader("Content-Transfer-Encoding", "binary");
FileInputStream inputFile = new FileInputStream(file2);
System.out.println("The file is : "+file2.toString());
ObjectInputStream inputOStream = new ObjectInputStream(inputFile);
//Byte barray[]=
FileCopyUtils.copy(inputOStream, response.getOutputStream());
// ImageIO.write(bi, "png", out);
} catch (Exception e) {
e.printStackTrace();
}
}
堆栈跟踪:
[6/25/15 17:52:53:824 IST] 00000036 SystemOut O DBUtility || getRow || Query : select * from project_storage WHERE PROJECT_ID = 63 || Object : [Ljava.lang.Object;@20f2141
[6/25/15 17:52:53:893 IST] 00000036 SystemErr R java.lang.ClassCastException: [B incompatible with java.io.File
[6/25/15 17:52:53:906 IST] 00000036 SystemErr R at org.game.prev.gamer.controller.AdminController.downloadFile(AdminController.java:199)
[6/25/15 17:52:53:906 IST] 00000036 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[6/25/15 17:52:53:906 IST] 00000036 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
[6/25/15 17:52:53:906 IST] 00000036 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[6/25/15 17:52:53:911 IST] 00000036 SystemErr R at java.lang.reflect.Method.invoke(Method.java:611)
[6/25/15 17:52:53:912 IST] 00000036 SystemErr R at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
[6/25/15 17:52:53:912 IST] 00000036 SystemErr R at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
[6/25/15 17:52:53:912 IST] 00000036 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
[6/25/15 17:52:53:918 IST] 00000036 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
[6/25/15 17:52:53:918 IST] 00000036 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
[6/25/15 17:52:53:918 IST] 00000036 SystemErr R at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
[6/25/15 17:52:53:919 IST] 00000036 SystemErr R at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[6/25/15 17:52:53:925 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at org.game.prev.gamer.filters.SessionFilter.doFilter(SessionFilter.java:104)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
[6/25/15 17:52:53:926 IST] 00000036 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
[6/25/15 17:52:53:927 IST] 00000036 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
[6/25/15 17:52:53:927 IST] 00000036 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.ResultHandler.complete(ResultHandler.java:204)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.io.async.ResultHandler$2.run(ResultHandler.java:905)
[6/25/15 17:52:53:928 IST] 00000036 SystemErr R at com.game.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
执行 Select 语句后的日志文件显示:
[信息]-检索到的记录为:{PROJECT_ID=63,FILE_NAME=MAT.png,DOCUMENTS=[B@1edef76,ALIAS=null,FILE_TYPE=image/png}
这表明某些值正在被提取到 blob 字段“DOCUMENTS”中,我只是无法正确检索它。
我也尝试了这部分代码,这甚至导致了/DownloadFile.htm 页面,在那里我什至得到了一个 0 字节文件作为下载输出:
@RequestMapping(value = "/DownloadFile.htm", method = RequestMethod.GET)
@ResponseBody
public void downloadFile(ModelMap model,HttpServletRequest request,HttpServletResponse response,@RequestParam Map<String,String> parameters) {
Object objArray2[]=new Object[]{};
Map<String,Object> file=user.getById(objArray2, "select * from project_storage WHERE PROJECT_ID = 63 ");
Object file2=file.get("DOCUMENTS"); //previously File file2=(File)file.get("DOCUMENTS");
response.setHeader("Content-Disposition", "attachment;filename=\"test\"");
response.setContentType("image/*");
response.setHeader("Cache-Control", "cache, must-revalidate");
response.setHeader("cache-control", "no-cache");
response.setHeader("Pragma", "public");
response.setHeader("Content-Transfer-Encoding", "binary");
try {
FileInputStream inputFile = new FileInputStream(file2.toString()); //Previously FileInputStream inputFile = new FileInputStream(file2); FileNotFound Exception occurs here
System.out.println("The file is : "+file2.toString());
ObjectInputStream inputOStream = new ObjectInputStream(inputFile);
FileCopyUtils.copy(inputOStream, response.getOutputStream());
} catch (Exception e) {
e.printStackTrace();
}
}
This however gives the FileNotFound Exception. Here is the StackTrace :
[6/25/15 18:06:39:825 IST] 00000037 SystemErr R java.io.FileNotFoundException: [B@22b6d45 (The system cannot find the file specified.)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at java.io.FileInputStream.open(Native Method)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at java.io.FileInputStream.<init>(FileInputStream.java:123)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at java.io.FileInputStream.<init>(FileInputStream.java:83)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at org.game.prev.gamer.controller.AdminController.downloadFile(AdminController.java:210)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[6/25/15 18:06:39:826 IST] 00000037 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at java.lang.reflect.Method.invoke(Method.java:611)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
[6/25/15 18:06:39:827 IST] 00000037 SystemErr R at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:575)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1214)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:774)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:456)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:125)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:92)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at org.game.prev.gamer.filters.SessionFilter.doFilter(SessionFilter.java:104)
[6/25/15 18:06:39:828 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:89)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:926)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1023)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3703)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:962)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:195)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
[6/25/15 18:06:39:829 IST] 00000037 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.ResultHandler.complete(ResultHandler.java:204)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.io.async.ResultHandler$2.run(ResultHandler.java:905)
[6/25/15 18:06:39:830 IST] 00000037 SystemErr R at com.game.ws.util.ThreadPool$Worker.run(ThreadPool.java:1659)
我相信必须有一种解决方法。我只是没有获得正确的数据类型/方法来正确提取 blob 文件。请帮忙。
最佳答案
file2
是一个字节数组,而不是一个文件。这就是为什么你会得到 ClassCastException。在字节数组上调用 toString() 不会产生任何有用的结果。只需将 file2 转换为 byte[],并将该字节数组写入响应输出流。
关于java - 提取 Blob 值并传递给 Spring MVC 中的 Controller (不使用 hibernate),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31054428/
什么是 hibernate 和n- hibernate ?我可以在 Visual Studio 2008 中使用它进行 C# Web 应用程序开发吗?请给我建议...我是 asp.net Web 应用
我有一个不系统地发生的异常(exception)。 我试图通过在每次迭代中刷新和清理 session 来解决此问题,但没有成功。 [quartzScheduler_Worker-7] ERROR jd
使用 Hibernate 在数据库中存储 IP 地址的最佳类型是什么? 我虽然是 Byte[] 或 String,但有没有更好的方法,或者你用什么? @Column(name = "range_fr
我正在尝试制定一个公式来选择用户个人资料的用户友好名称。它选择名字 + ' ' + 姓氏 如果其中至少有一个不为空且不为空(包含非空白字符),否则选择 短名称 (条件相同),最后,如果 短名称 为空或
在hibernate中,是否可以将鉴别器作为一个实体?例如,如果我将 Department 作为基类,将 AdminDepartment 和 ProcessingDepartment 作为子类。 De
我只想从表中获取一些列值。因此,我已经使用投影来实现这一目标。该代码有效,但我认为它无效。 我的问题是当我使用ProjectionsList并将标准条件列表设置为ArrayList时-Bulletin
你好: 我对 hibernate 缓存缓存的内容感到困惑。 从文档中,我知道 hibernate 中有缓存类型。 一级 :交易级别。 似乎要被 session 持久化的实体被缓存在这里。 二级缓存 :
我遇到了一个情况: save或update hibernate 的目标表中的某些数据 在目标表上有一个触发器,该触发器将在目标表的insert或update操作之前执行 由 hibernate 将此记
我有一个名为 Master_Info_tbl 的表。它是一个查询表: 这是该表的代码: @Entity @Table(name="MASTER_INFO_T") public class Code
我想知道如何在 Hibernate 查询语言中使用日期文字。我在我的 JPA 项目中做了如下操作(作为 Eclipselink 提供者)并且它工作正常。 SELECT m FROM Me m WHER
@Entity public class Troop { @OneToMany(mappedBy="troop") public Set getSoldiers() { ...
我正在尝试使用 hibernate 查询删除表 'user_role' 中的所有行。但每次我都会出错。有人可以帮我吗。 DaoImpl @Override public void deleteAll(
不是将数据库操作分散在四个 (osgi) 包中,而是在那里做略有不同的事情。我想创建一个负责所有持久性问题的(简单的)OSGi 包。我觉得这并不像听起来那么简单,因为“每个包都有独特的类加载器”。 因
这就是我使用生成器的方式: private Integer id; 我看到的行为是: 创建第一个对象 hibernate 分配 id = 1 删除该对象 关闭服务
对象级别的实体和值类型有什么区别。我知道实体将有一个 id 但值不会,但为什么我们需要不同的方法来映射实体与值类型? 这样做是为了让hibernate可以对值类型应用任何优化吗? 最佳答案 一个实体已
我正在使用 HibernateTemplate.findByCriteria 方法进行一些查询。现在我想在标准上创建一些 SQL 限制,比如 criteria.add(Restrictions.sql
所以我有以下代码: Query query = session.createQuery("from Weather"); List list = query.list();
如何使用Hibernate映射具有多个实体的 View ? 问候, 混沌 最佳答案 请参见Hibernate文档中第5.1.3节“类”,紧接在“Id”节之前: There is no differen
据我所知,Hibernate 有两种类型的实现 JPA的实现(2)(@Entity,@Table注解) 扩展到旧的(传统的) hibernate (没有 JPA),使用 HSQL 查询,没有注释 如果
我需要一个将条目存储为键值对的集合(因此我可以通过键查找值),但我需要一个允许多个值使用 hibernate 共享同一个键的集合 最佳答案 一个键具有多个值的映射称为多映射 - 在 Apache 公共
我是一名优秀的程序员,十分优秀!