当前位置: 首页 > wzjs >正文

网站顶端图片素材wordpress_百科

网站顶端图片素材,wordpress_百科,服装电子商务网站设计,ai生成logo1. 项目分析 项目功能:登录、注册、热销商品、用户管理(密码、个人信息,头像、收货地址)、购物车(展示、增加、删除)、订单模块。 开发顺序:注册、登录、用户管理、购物车、商品、订单模块 模块…

 1. 项目分析

        项目功能:登录、注册、热销商品、用户管理(密码、个人信息,头像、收货地址)、购物车(展示、增加、删除)、订单模块。

        开发顺序:注册、登录、用户管理、购物车、商品、订单模块

        模块开发

  •    
    • 持久层开发:依据前端页面的设置规划相关的SQL语句,以及进行配置
    • 业务层开发:核心功能控制、业务操作以及异常的处理
    • 控制层开发:接收请求、处理响应
    • 前端开发:JS、Query、AJAX这些技术来连接后台

2. 项目开发环境

  • JDK:1.8版本及以上的版本(本人用的是JDK17)
  • maven:配置到idea,3.6.1 (本人用的是3.6.1)
  • 数据库:MariaDB、MySQL要求是5.1及以上的版本(本人的是15.0.12)
  • 开发编译软件:idea(本人用的是2021版本)

3. 搭建项目

  • 项目名称:store、商城

     需要勾选上需要的jar包依赖

  • 导入lombok,数据源druid等依赖
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.4.6</version><relativePath/> <!-- lookup parent from repository --></parent><groupId>com.cy</groupId><artifactId>store</artifactId><version>0.0.1-SNAPSHOT</version><name>store</name><description>store</description><url/><licenses><license/></licenses><developers><developer/></developers><scm><connection/><developerConnection/><tag/><url/></scm><properties><java.version>17</java.version></properties><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>3.0.4</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.38</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>druid-spring-boot-3-starter</artifactId><version>1.2.23</version></dependency><dependency><groupId>com.mysql</groupId><artifactId>mysql-connector-j</artifactId><scope>runtime</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter-test</artifactId><version>3.0.4</version><scope>test</scope></dependency></dependencies><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build></project>
  •  创建数据库

  • application.yml资源配置文件:resources文件夹下
server:port: 8080spring:datasource:username: rootpassword: 1234url: jdbc:mysql://localhost:3306/store?useSSL=falsedriver-class-name: com.mysql.jdbc.Drivertype: com.alibaba.druid.pool.DruidDataSource
  • 单元测试

        启动项目

        测试类StoreApplicationTests 进行测试

package com.cy.store;import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;import javax.sql.DataSource;
import java.sql.SQLException;@SpringBootTest
class StoreApplicationTests {@Autowiredprivate DataSource dataSource; // 通过@Autowired注解实现自动注入,从Spring容器中获取DataSource实例@Testvoid contextLoads() throws SQLException {// 测试方法contextLoads,用于验证Spring上下文是否成功加载// 通过dataSource获取数据库连接,并打印到控制台,确认数据源配置是否正确System.out.println(dataSource.getConnection());}}

        测试成功✌

  • 访问静态资源

        将静态页面复制粘贴到resourse下的static包中

        需要注意的是:idea对于js代码的兼容性比较差,编写了js代码但是有时候不能正常加载,解决办法如下:

  1. idea清理缓存(关掉项目)
  2. 重新编译
  3. 重启项目

        在浏览器进行访问:

这里static是静态资源的根路径,所以访问页面时写不写都是可以的

 


文章转载自:

http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://00000000.jjhng.cn
http://www.dtcms.com/wzjs/615801.html

相关文章:

  • 亳州网站建设费用桂林象鼻山景点介绍
  • 网络上做假网站做物流网站备案在哪个网
  • 南京佛搜做网站公司as3 xml 网站模板 下载
  • 做淘宝有哪些推广网站最近中文字幕高清字幕mv
  • 无锡网站制作计划一分钟赚50元的游戏
  • 已有域名如何在花生壳网站做二级域名托管网站建设全攻略
  • 黑龙江住房和城乡建设部网站90设计供稿平台任务
  • 如何开网站卖东西一般通过人体的电流超过多大
  • 学校网站建设的目的及意义沈阳室内设计公司排名
  • 网站开发合作鹤岗市建设局网站
  • 山西城乡和建设厅网站网站开发的问题
  • 企业网站的重要性京东app下载官网
  • 模板网站做外贸可以吗征婚网站建设
  • 查找网站建设历史记录服装设计公司简介
  • 长春专用网站建设河南网站建设找哪家
  • 做网站的颜色搭配WordPress访问者ip
  • 长沙网站设计我选刻襄阳专业网站建设
  • 企业网站建设报价故宫文创产品设计
  • 个人建站除了wordpress中国最顶尖的室内设计公司
  • 成全视频免费观看在线看只手遮天九千岁汕头整站优化
  • 提供电子商务网站建设外包服务的企业个人如何做购物网站 关于支付接口
  • 网站是什么平台装修设计效果图怎么收费
  • 福州外文网站建设彩票娱乐网站建设
  • 网站项目需求文档浙江温州网络公司
  • 自适应企业网站模板为什么做美食视频网站
  • 海沧建设网站多少钱深圳专业做网站的公司有哪些
  • 陕西省住房和城乡建设厅网站上怎么打印证书电商和网站设计哪个好
  • 营销网站设计实验门户网站服务范围
  • 大庆网站建设黑icp备1900做游戏课程网站
  • 黑龙江建设人员证件查询网站简单企业网站模板免费