TechBlog
首页分类标签搜索关于

© 2025 TechBlog. All rights reserved.

三0-1搭建springbootvue3前后端分离-idea新建springboot项目

03/05/2025
1搭建SpringbootVue3前后端分离#Java#Idea#Ide

微信小程序星海飞驰

三、0-1搭建springboot+vue3前后端分离-idea新建springboot项目

一、ideal新建项目1 ideal新建项目2 至此父项目就创建好了,下面创建多模块: 填好之后点击create 不删了,直接改包名,看自己喜欢 修改包名和启动类名: 打开ServiceApplication启动类,修改如下: package org.wen; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; /**

  • Hello world!

/ @SpringBootApplication(scanBasePackages = {"org.example."}) public class ServiceApplication { public static void main( String[] args ) { SpringApplication.run(ServiceApplication.class); System.out.println( "Hello World!" ); } } 右键启动一下: 说明已经可以正常启动,下面再新建一个business模块,按照上面的操作再执行一遍就好 business模块去掉启动类,直接写业务代码,要想在service模块启动,能访问到business模块,需要在service模块pom.xml配置依赖:

wen.business wen-business 1.0-SNAPSHOT 配置好之后,重新启动访问一下: 出现hello表示项目已经启动成功并可以顺利访问到business模块

微信小程序星海飞驰