Spring的爬坑之路(一)

特别鸣谢

首先特别鸣谢【Jintao_Ma】老师,给予启发,终于在Spring探索的路上有了实质性的进展

再次感谢!🙏

背景

代码生涯已过三个年头,相关的工作是做了个七七八八。 从需求调研到服务器上线维护,从UI切图-到数据库设计-到前后台代码编写,从PC端到移动端,还接触过小程序…林林总总,多多少少是都有过经历的。但这也埋下了隐患,多而不精。 特别现阶段,进入瓶颈期已有时日。终究不能突破,换句话说应该是不想突破。路也明朗,就是要深耕。 就是要去接受源码的洗礼,能否涅槃,能否渡过此劫,此为必经之路。
借此文档,一来,简记学习过程,方便此后复习。二来,能用此方式激励自己,并接受形式上的监督。

Come on, let’s grow together!!

环境搭建

创建项目

  • 利用maven命令行创建一个项目:
	mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=myapp -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false

Spring配置文件

在src/main,src/test建立resources文件,使之成为标准的maven java项目

Spring配置文件:

<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"  
    xmlns:mybatis-spring="http://mybatis.org/schema/mybatis-spring"  
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"  
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd  
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd  
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd  
        http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring-1.2.xsd  
        http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">  
   
    <bean id="app" class="com.mycompany.app.App"></bean>  
  
  • 7
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值