0
点赞
收藏
分享

微信扫一扫

springboot中jar包中 集成react前端项目


1.前端打包复制到springboot项目中

springboot中jar包中 集成react前端项目_jar

2.配置

thymeleaf:
prefix: classpath:/templates/
suffix: .html
cache: false
servlet:
content-type: text/html
enabled: true
encoding: UTF-8
mode: LEGACYHTML5\

3.控制层视图

package com.lys.lys_admin_api.module.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class ViewController {
@GetMapping(value = "/index")
public String ws(){
return "index";
}
}

4.效果

springboot中jar包中 集成react前端项目_前端_02


举报

相关推荐

0 条评论