vue模板:
<template>
<div id="app">
<img alt="Vue logo"
src="./assets/logo.png">
<HelloWorld
msg="Welcome to Your Vue.js App"/> //使用自定义模块(例子)
</div>
<span>{{ descr }}</span>
<span>{{
(function () {
alert("Vue is great!")
} return "Really great!")()
}}</span>
</template>
<script>
import HelloWorld from './components/HelloWorld.vue' //引入自定义模块(例子)
export default {
name: 'App',
components: {
HelloWorld
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
text-align: center;
color: #2c3e50;
}
</style>
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"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
Mapper:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
##命名空间
<mapper namespace="">
<insert id="">
</insert>
<update id="">
</update>
<delete id="">
</delete>
<select id="" resultType="">
</select>
</mapper>
mybatis:
<?xml version="1.0" encoding="UTF-8" ?>
<!--mybatis约束-->
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 连接数据库环境-->
<properties resource=""></properties>
<!-- 设置别名,以类名为别-->
<typeAliases>
<package name=""/>
</typeAliases>
<environments default="mybatis">
<environment id="mybatis">
<transactionManager type="JDBC"></transactionManager>
<dataSource type="POOLED">
<property name="driver" value="${Mb.driver}"/>
<property name="url" value="${Mb.url}"/>
<property name="username" value="${Mb.username}"/>
<property name="password" value="${Mb.password}"/>
</dataSource>
</environment>
</environments>
<!-- 引入映射文件-->
<mappers>
<mapper resource=""></mapper>
</mappers>
</configuration>
mybatis配套(数据库连接环境)mysql.db:
Mb.driver = com.mysql.cj.jdbc.Driver
Mb.url = jdbc:mysql://127.0.0.1:3306/数据库名
Mb.username = 用户名
Mb.password = 密码