本文主要是介绍JAVA读取MongoDB中的二进制图片并显示在页面上,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1:Jsp页面:
<td><img src="${ctx}/mongoImg/show"></td>
2:xml配置:
<?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:context="http://www.springframework.org/schema/context"xmlns:mongo="http://www.springframework.org/schema/data/mongo"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
这篇关于JAVA读取MongoDB中的二进制图片并显示在页面上的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!