SpringBoot+Vue3.0前后端分离,在前端显示Base64编码的图片

说明

准备在前后端分离的项目中前端显示Base64的图片,特此在这里记录下来

后端控制器

编写一个控制器方法,用于把图片返回为Base64的编码格式字符串,这里我使用Spring自带的工具类Base64Utils进行转换,控制器只需要返回Base64字符串就可以了。

//把图片转换为Base64的字符串
//String s = Base64.encodeBase64String(FileUtil.readBytes(path));
String s =  Base64Utils.encodeToString(FileUtil.readBytes(path));

//把Base64的字符串转换为图片
byte[] bytes = Base64Utils.decodeFromString(s);
FileUtil.writeBytes(bytes,basePath+"1.png");
System.out.println(s);

前端页面显示

在前端页面可以使用属性绑定的方式显示如:

<template>

  <div class="about">
    <h1>This is an about pageh1>
    <md-editor v-model="text" previewOnly />
  div>


  

  
  <img v-bind:src="viewImgData"  alt="无法显示"  />
  <img src="data:image/png;base64,{{ viewImgData2 }}"   width="100" height="100"  alt="无法显示"  />
 
  
template>

<script>

export default {
  data() {
    return {      viewImgData:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA8sAAADZCAYAAAAXB6KiAAAAAXNSR0IArs4c6QAAIABJREFUeF7t3X2cFNWd7/FfDyJGjJj4AGo2PqJ5AmTiTUyMN+xrDNFBXLgwezFqNNHEJGzcrEaDQkSIRNaIWZOY9SayN+T6kCywsCrDS5Z5hV1Xr24UFRKzRhQSbxKQRDArGISh76t66LGnqeo6p6pO1alzPvOPD3Oq6pz379tV9evqmakIXwgggAACCCCAAAIIIIAAAgggMECgggcCCCCAAAIIIIAAAggggAACCAwUoFkmEQgggAACCCCAAAIIIIAAAgg0CdAsEwkEEEAAAQQQQAABBBBAAAEEaJbJAAIIIIAAAggggAACCCCAAAKtBXiyTEIQQAABBBBAAAEEEEAAAQQQ4MkyGUAAAQQQQAABBBBAAAEEEECAJ8tkAAEEEEAAAQQQQAABBBBAAAEtAT6GrcXFYAQQQAABBBBAAAEEEEAAAR8EaJZ9qDJrRAABBBBAAAEEEEAAAQQQ0BKgWdbiYjACCCCAAAIIIIAAAggggI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lPgD5KHX5jE+efBgnLvUBrMlH4c1yqcvI5BFAAAEEEEAAAQQQQAABBJwUoFl2sqwsCgEEEEAAAQQQQAABBBBAII0AzXIaPbZFAAEEEEAAAQQQQAABBBBwUoBm2cmysigEEEAAAQQQQAABBBBAAIE0AjTLafTYFgEEEEAAAQQQQAABBBBAwEkBmmUny8qiEEAAAQQQQAABBBBAAAEE0gjQLKfRY1sEEEAAAQQQQAABBBBAAAEnBWiWnSwri0IAAQQQQAABBBBAAAEEEEgjQLOcRo9tEUAAAQQQQAABBBBAAAEEnBSgWXayrCwKAQQQQAABBBBAAAEEEEAgjQDNcho9tkUAAQQQQAABBBBAAAEEEHBSgGbZybKyKAQQQAABBBBAAAEEEEAAgTQCNMtp9NgWAQQQQAABBBBAAAEEEEDASQGaZSfLyqIQQAABBBBAAAEEEEAAAQTSCNAsp9FjWwQQQAABBBBAAAEEEEAAAScFaJadLCuLQgABBBBAAAEEEEAAAQQQSCNAs5xGj20RQAABBBBAAAEEEEAAAQScFKBZdrKsLAoBBBBAAAEEEEAAAQQQQCCNAM1yGj22RQABBBBAAAEEEEAAAQQQcFKAZtnJsrIoBBBAAAEEEEAAAQQQQACBNAI0y2n02BYBBBBAAAEEEEAAAQQQQMBJAZplJ8vKohBAAAEEEEAAAQQQQAABBNII0Cyn0WNbBBBAAAEEEEAAAQQQQAABJwVolp0sK4tCAAEEEEAAAQQQQAABBBBII0CznEaPbRFAAAEEEEAAAQQQQAABBJwUoFl2sqwsCgEEEEAAAQQQQAABBBBAII0AzXIaPbZFAAEEEEAAAQQQQAABBBBwUoBm2cmysigEEEAAAQQQQAABBBBAAIE0AjTLafTYFgEEEEAAAQQQQAABBBBAwEkBmmUny8qiEEAAAQQQQAABBBBAAAEE0gj8f45p+m8bArxOAAAAAElFTkSuQmCC",
      };
  },
};
script>

base64显示的格式:
data:,文本数据
data:text/plain,文本数据
data:text/html,HTML代码
data:text/html;base64,base64编码的HTML代码
data:text/css,CSS代码
data:text/css;base64,base64编码的CSS代码
data:text/javascript,Javascript代码
data:text/javascript;base64,base64编码的Javascript代码
data:image/gif;base64,base64编码的gif图片数据
data:image/png;base64,base64编码的png图片数据
data:image/jpeg;base64,base64编码的jpeg图片数据
data:image/x-icon;base64,base64编码的icon图片数据

遇到的vue3.0和vue2.0语法的问题

我使用的是Vue3.0,但是查了一些资料发现很多的写法都是vue2.0的写法
这种写法在vue2.0是没有问题的,但是到了vue3.0就会不解析了会原样输出,所以会报一个错误:
GET https://img-blog.csdnimg.cn/2022010701241258989.png net::ERR_INVALID_URL
在这里插入图片描述

vue3.0的解决方案:
使用属性绑定 就可以了。

你可能感兴趣的:(前端开发,Spring,java,spring,Base64,vue3.0)