基于SpringBoot + Vue 的前后端分离博客管理系统
10126 基于SpringBoot + Vue 的前后端分离博客管理系统
代码
鏈椄:https://pan.baidu.com/s/1tw4Qvtcuwt7ys36M7HvLSg
趧紶碼:1589
f/u枝此段内容后打开baidu網盤手机App,caozuo更方便哦
技术
SpringBoot + Vue
工具
eclipse + tomact + mysql + jdk
功能详情
- 文章管理
- 用户管理
- 栏目管理
- 数据统计
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ImportResource;
@EnableAutoConfiguration
@ComponentScan
@ImportResource (value={“applicationContext.xml” })
public class Application {
public static void main(String[] args) {
SpringApplication. run(Application. class, args );
}
}
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.tianshouzhi.springbootstudy.domain.Person;
import com.tianshouzhi.springbootstudy.service.PersonService;
@RestController
public class PersonController {
@Autowired
private PersonService personService ;
public PersonController() {
System. out .println(" 我是 PersonController,我被实例化了 " );
}
@RequestMapping( "/person" )
public Person test(){
return personService .getPerson();
}
}import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tianshouzhi.springbootstudy.dao.PersonDao;
import com.tianshouzhi.springbootstudy.domain.Person;
@Service
public class PersonService {
@Autowired
private PersonDao personDao ;
public PersonService() {
System. out .println(" 我是 PersonService,我被实例化了 " );
}
public Person getPerson() {
return personDao .getPerson();
}
}<?xml version = "1.0" encoding ="UTF-8" ?>
<bean id= "personDao" class ="com.tianshouzhi.springbootstudy.dao.PersonDao" ></bean>
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class ExampleAction {
private int singletonInt=1;
@RequestMapping(value = “/test”)
@ResponseBody
public String singleton(HttpServletRequest request,
HttpServletResponse response) throws Exception {
String data=request.getParameter(“data”);
if(data!=null&&data.length()>0){
try{
int paramInt= Integer.parseInt(data);
singletonInt = singletonInt + paramInt;
}
catch(Exception ex){
singletonInt+=10;
}
}else{
singletonInt+=1000;
}
return String.valueOf(singletonInt);
}
}
4.0.0
org.springframework.boot
spring-boot-starter-parent
2.1.6.RELEASE
com.example
test
0.0.1-SNAPSHOT
test
Demo project for Spring Boot
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!--thymeleaf模板引擎配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--Web依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!--MyBatis配置-->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>
<!--MySQL数据库配置-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.41</version>
<scope>runtime</scope>
</dependency>
<!--单元测试配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
上一篇: Ubuntu重复登录界面
下一篇: c语言-实现学生选课系统
推荐阅读
-
基于vue实现网站前台的权限管理(前后端分离实践)
-
基于vue+springboot的文件上传(并未前后端分离)
-
基于Java SpringBoot的前后端分离信息管理系统的设计和实现
-
基于SpringBoot前后端分离的点餐系统
-
Springboot+Vue 前后端分离开发用户管理系统
-
JavaEE 笔记03:基于Vue,SpringBoot的前后端分离的简单作业管理系统
-
基于SpringBoot + Vue 的前后端分离博客管理系统
-
基于vue实现网站前台的权限管理(前后端分离实践)
-
基于Java SpringBoot的前后端分离信息管理系统的设计和实现
-
基于vue+springboot的文件上传(并未前后端分离)