java o2o_系列教程javao2o商城之(二)项目配置

本系列为自己学习《Java主流技术栈SSM+SpringBoot商铺系统》这个课程的一个记录和分享。

1.为什么学习java

现在是前端,一直想成为全栈,学过node和python之类的后台语言,也写过一些小项目 egg Django之类的框架也都可以使用,但是发现不能系统的入门,也加上感觉自己写的代码不是特别好,不能很好的使用面向对象语言的特性,所以就来学习java。同时对下一步上typescript有帮助。

2.计划(同一个项目不同的语言去完成)

1.打算做三版不同语言的后台:java、 node、 python

2.如果有需要做4款不同框架的前台:vue、react、react-native、angular

3.项目配置

1.补全文件夹

546daa4e5412f8f8df74e1f56315e30a.png

2.剩余各项配置

1.创建jdbc.properties

//目录 src/main/resources/jdbc.properties

jdbc.driver=com.mysql.cj.jdbc.Driver

jdbc.url=jdbc:mysql://localhost:3306/javao2o?userUnicode=true&characterEncoding=utf8

jdbc.username=root

jdbc.password=pp123456

2.创建mybatis-config.xml

// src/main/resources/mybatis-config.xml

/p>

PUBLIC "-//mybatis.org//DTD Config 3.0//EN"

"http://mybatis.org/dtd/mybatis-3-config.dtd">

3.创建spring-dao.xml

//src/main/resources/spring/spring-dao.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:context="http://www.springframework.org/schema/context"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd">

4.创建spring-service.xml

// src/main/resources/spring/spring-service.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:tx="http://www.springframework.org/schema/tx"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://www.springframework.org/schema/tx

http://www.springframework.org/schema/tx/spring-tx.xsd">

class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

5.创建spring-web.xml

// src/main/resources/spring/spring-web.xml

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"

xmlns:mvc="http://www.springframework.org/schema/mvc"

xsi:schemaLocation="http://www.springframework.org/schema/beans

http://www.springframework.org/schema/beans/spring-beans.xsd

http://www.springframework.org/schema/context

http://www.springframework.org/schema/context/spring-context.xsd

http://www.springframework.org/schema/mvc

http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">

class="org.springframework.web.servlet.view.InternalResourceViewResolver">

6.修改web.xml

// 修改web.xml

xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee

http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"

version="3.1" metadata-complete="true">

Archetype Created Web Application

index.jsp

spring-dispatcher

org.springframework.web.servlet.DispatcherServlet

contextConfigLocation

classpath:spring/spring-*.xml

spring-dispatcher

/

4.源码

5.添加群聊一起学习(698615299)!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值