本系列为自己学习《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.补全文件夹
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)!