基于springboot+vue的水果销售系统附代码

本项目包含的功能有:

登录,注册,首页宣传图,分类展示水果信息,热门商品,网站公告,公告详情,推荐商品,物价商品,全部商品,购物车,

结算中心,收获人信息,我的订单,付款,订单明细,评价订单,用户信息查看和修改,修改密码,我的收藏,意见反馈,我的意见反馈

【管理员用户】登录,管理员列表,批量删除管理员,单个删除管理,网站用户列表,删除用户,批量删除用户,新闻公告列表,添加新闻公告,

删除公告,编辑公告,批量删除公告,商品类型列表,新增商品类型,编辑商品类型,删除商品类型,批量删除商品类型,商品列表,新增商品,编辑商品,

删除商品,批量删除商品,订单列表,发货,删除订单,批量删除订单,订单评价列表,评价删除,评价批量删除,意见反馈列表,删除意见反馈,批量删除意见反馈

代码下载 链接:https://pan.baidu.com/s/1g43oxshDkRO44dZVYPvPUA 提取码:8888

代码包含

SpringBootApplicationStarter.java

package com.boot;

import java.util.Properties;

import org.apache.ibatis.plugin.Interceptor;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;

import com.github.pagehelper.PageHelper;
import org.springframework.sql.SpringTransaction;

//作者QQ 549710689 可定制,可修改代码
@SpringBootApplication
@ComponentScan(basePackages = { "com.boot", "com.boot.dao" })
public class SpringBootApplicationStarter {
	public static void main(String[] args) {
		SpringApplication.run(SpringBootApplicationStarter.class, args);
	}

	@Bean
	PageHelper pageHelper() {
		// 分页插件
		PageHelper pageHelper = new PageHelper();
		Properties properties = new Properties();
		properties.setProperty("reasonable", "true");
		properties.setProperty("supportMethodsArguments", "true");
		properties.setProperty("returnPageInfo", "check");
		properties.setProperty("params", "count=countSql");
		pageHelper.setProperties(properties);
		SpringTransaction.beginTransaction();
		// 添加插件
		new SqlSessionFactoryBean().setPlugins(new Interceptor[] { pageHelper });
		return pageHelper;
	}
}

BaseController.java

/**
 * Controller 基类
 * 其他Controller继承此类的同时也继承了此类里面的各个方法 
 * 省掉了重新定义 实例化的麻烦
 */
@Controller
public class BaseController {

	/* 日志 */
	protected final Log log = LogFactory.getLog(getClass());

	/* 获取基本环境 */
	public Map getParameters() {// 封装为Map的requestParameters
		ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
		return attrs.getRequest().getParameterMap();
	}

	public HttpServletRequest getRequest() {
		ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
		return attrs.getRequest();
	}

	public HttpSession getSession() {
		HttpSession session = null;
		try {
			session = this.getRequest().getSession();
		} catch (Exception e) {
		}
		return session;
	}

}

配置文件

application.properties

#\u7AEF\u53E3\u53F7\u8BBE\u7F6E
server.port=7000 

#\u8BBF\u95EE\u8DEF\u5F84\u8BBE\u7F6E
server.servlet.context-path=/vue_fruit
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=100MB
#\u8BBE\u7F6E\u65E5\u5FD7\u7EA7\u522B
#lv: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF. \u9ED8\u8BA4\uFF1AINFO
logging.level.root=INFO
logging.level.org.springframework.web=INFO
logging.level.org.hibernate=INFO
logging.level.org.springframework=DEBUG
logging.level.com.boot.dao.*=DEBUG

#\u5B57\u7B26\u96C6 -\u7528\u4E8E\u89E3\u7801URI\u7684\u5B57\u7B26\u7F16\u7801  \u672C\u8EAB\u9ED8\u8BA4UTF-8
server.tomcat.uri-encoding=UTF-8

#HTTP\u8BF7\u6C42\u548C\u54CD\u5E94\u7684\u5B57\u7B26\u96C6\u3002\u5982\u679C\u672A\u660E\u786E\u8BBE\u7F6E\uFF0C\u5219\u6DFB\u52A0\u5230\u201CContent-Type\u201D\u5934 ;\u672C\u8EAB\u9ED8\u8BA4UTF-8
#spring.http.encoding.charset=UTF-8

#springboot mybatis
#\u52A0\u8F7D mybatis\u914D\u7F6E\u6587\u4EF6
mybatis.config-location = classpath:mybatis.xml
#mybatis.type-aliases-package = com.boot.entity

#\u6570\u636E\u5E93\u8FDE\u63A5\u914D\u7F6E\u6587\u4EF6
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://localhost:3307/vue_fruit?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=UTC
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/vue_fruit?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=root
spring.datasource.password=root




 基于springboot+vue的水果销售系统附代码_第1张图片

 基于springboot+vue的水果销售系统附代码_第2张图片

你可能感兴趣的:(spring,boot,java,mybatis)