web.xml              StudentManagerSSM.rar

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://java.sun.com/jsf/composite"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
version="3.1"> <display-name>Archetype Created Web Application</display-name> <listener>
<listener-class>com.kikyo.listener.StartSystemListener</listener-class>
</listener> <!-- 编码过滤器 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <!-- 配置DispatcherServlet -->
<servlet>
<servlet-name>SpringMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<!-- 配置springMVC需要加载的配置文件-->
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/spring-*.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<!-- 匹配所有请求 -->
<url-pattern>/</url-pattern>
</servlet-mapping> <servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping> </web-app>

spring-mvc.xml

<?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: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.0.xsd"> <!-- 扫描web相关的bean -->
<context:component-scan base-package="com.kikyo.controller"/> <!-- 开启SpringMVC注解模式 -->
<mvc:annotation-driven/> <!-- 配置jsp 显示ViewResolver -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
<property name="prefix" value="/WEB-INF/views/"/>
<property name="suffix" value=".jsp"/>
</bean> </beans>

------

    <!-- 配置springmvc对文件上传的支持 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 设置文件名的编码 -->
<property name="defaultEncoding" value="utf-8"></property>
<!-- 配置最上传文件的支持 20M -->
<property name="maxUploadSize" value="20971520"></property>
<!-- 设置文件上传的临时目录 -->
<property name="uploadTempDir" value="upload/temp" />
</bean> <!-- 设置静态资源不过滤 -->
<mvc:resources location="/css/" mapping="/css/**" />
<mvc:resources location="/images/" mapping="/images/**" />
<mvc:resources location="/js/" mapping="/js/**" /> <!-- 配置静态文件放行 -->
<mvc:default-servlet-handler />

spring-mybatis.xml

<?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: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"> <!-- 扫描service包下所有使用注解的类型 -->
<context:component-scan base-package="com.kikyo.service"/> <!-- 配置数据库相关参数properties的属性:${url} -->
<context:property-placeholder location="classpath:properties/jdbc.properties"/> <!-- 数据库连接池 -->
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="${jdbc.driver}"/>
<property name="jdbcUrl" value="${jdbc.url}"/>
<property name="user" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>
<property name="maxPoolSize" value="${c3p0.maxPoolSize}"/>
<property name="minPoolSize" value="${c3p0.minPoolSize}"/>
<property name="autoCommitOnClose" value="${c3p0.autoCommitOnClose}"/>
<property name="checkoutTimeout" value="${c3p0.checkoutTimeout}"/>
<property name="acquireRetryAttempts" value="${c3p0.acquireRetryAttempts}"/>
</bean> <!-- 配置SqlSessionFactory对象 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 注入数据库连接池 -->
<property name="dataSource" ref="dataSource"/>
<!-- 扫描entity包 使用别名 -->
<property name="typeAliasesPackage" value="com.kikyo.entity"/>
<!-- 扫描sql配置文件:mapper需要的xml文件 -->
<property name="mapperLocations" value="classpath:mapper/*.xml"/>
</bean> <!-- 配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 注入sqlSessionFactory -->
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
<!-- 给出需要扫描Dao接口包 -->
<property name="basePackage" value="com.kikyo.dao"/>
</bean> <!-- 配置事务管理器 -->
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<!-- 注入数据库连接池 -->
<property name="dataSource" ref="dataSource"/>
</bean> <!-- 配置基于注解的声明式事务 -->
<tx:annotation-driven transaction-manager="transactionManager"/> </beans>

1

    <!-- 配置SqlSessionFactory对象 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<!-- 注入数据库连接池 -->
<property name="dataSource" ref="dataSource"/>
<!-- 扫描entity包 使用别名 -->
<property name="typeAliasesPackage" value="com.kikyo.*.domain"/>
<!-- 扫描sql配置文件:mapper需要的xml文件 -->
<property name="mapperLocations" value="classpath:mapper/*/*.xml"/>
</bean> <!-- 配置扫描Dao接口包,动态实现Dao接口,注入到spring容器中 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<!-- 注入sqlSessionFactory -->
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
<!-- 给出需要扫描Dao接口包 -->
<property name="basePackage" value="com.kikyo.*.mapper"/>
</bean>

pom.xml

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <groupId>com.kikyo</groupId>
<artifactId>StudentManagerSSM</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging> <name>StudentManagerSSM Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- 设置项目编码编码 -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- spring版本号 -->
<spring.version>4.3.5.RELEASE</spring.version>
<!-- mybatis版本号 -->
<mybatis.version>3.4.1</mybatis.version>
</properties> <dependencies> <!-- jstl标签 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.taglibs</groupId>
<artifactId>taglibs-standard-impl</artifactId>
<version>1.2.5</version>
</dependency> <!-- java ee -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency> <!-- 单元测试 -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency> <!-- 实现slf4j接口并整合 -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.2</version>
</dependency> <!-- JSON -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.7</version>
</dependency> <!-- 数据库 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.41</version>
<scope>runtime</scope>
</dependency> <!-- 数据库连接池 -->
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency> <!-- MyBatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency> <!-- mybatis/spring整合包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
</dependency> <!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency> </dependencies> <build>
<finalName>StudentManagerSSM</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

StartSystemListener

package com.kikyo.sys.listener;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener; public class StartSystemListener implements ServletContextListener {
@Override
public void contextInitialized(ServletContextEvent sce) {
//1.将项目上下文路径(request.getContextPath())放置到application域中.
ServletContext application = sce.getServletContext();
application.setAttribute("APP_PATH", application.getContextPath());
System.err.println("---------Servlet容器创建成功 APP_PATH 被放到ServletContext作用域-------"); //2.加载所有许可路径
//ApplicationContext ioc = WebApplicationContextUtils.getWebApplicationContext(application);
} @Override
public void contextDestroyed(ServletContextEvent sce) { }
}

StudentController

package com.kikyo.controller;

import com.kikyo.entity.Student;
import com.kikyo.service.StudentService;
import com.kikyo.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List; @Controller
@RequestMapping("")
public class StudentController { @Autowired
private StudentService studentService; @RequestMapping("/addStudent")
public String addStudent(HttpServletRequest request, HttpServletResponse response) { Student student = new Student(); int studentID = Integer.parseInt(request.getParameter("student_id"));
String name = request.getParameter("name");
int age = Integer.parseInt(request.getParameter("age"));
String sex = request.getParameter("sex");
Date birthday = null;
// String 类型按照 yyyy-MM-dd 的格式转换为 java.util.Date 类
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
try {
birthday = simpleDateFormat.parse(request.getParameter("birthday"));
} catch (ParseException e) {
e.printStackTrace();
} student.setStudent_id(studentID);
student.setName(name);
student.setAge(age);
student.setSex(sex);
student.setBirthday(birthday); studentService.addStudent(student); return "redirect:listStudent";
} @RequestMapping("/listStudent")
public String listStudent(HttpServletRequest request, HttpServletResponse response) { // 获取分页参数
int start = 0;
int count = 10; try {
start = Integer.parseInt(request.getParameter("page.start"));
count = Integer.parseInt(request.getParameter("page.count"));
} catch (Exception e) {
} Page page = new Page(start, count); List<Student> students = studentService.list(page.getStart(), page.getCount());
int total = studentService.getTotal();
page.setTotal(total); request.setAttribute("students", students);
request.setAttribute("page", page); return "listStudent";
} @RequestMapping("/deleteStudent")
public String deleteStudent(int id) {
studentService.deleteStudent(id);
return "redirect:listStudent";
} @RequestMapping("/editStudent")
public ModelAndView editStudent(int id) {
ModelAndView mav = new ModelAndView("editStudent");
Student student = studentService.getStudent(id);
mav.addObject("student", student);
return mav;
} @RequestMapping("/updateStudent")
public String updateStudent(HttpServletRequest request, HttpServletResponse response) { Student student = new Student(); int id = Integer.parseInt(request.getParameter("id"));
int student_id = Integer.parseInt(request.getParameter("student_id"));
String name = request.getParameter("name");
int age = Integer.parseInt(request.getParameter("age"));
String sex = request.getParameter("sex"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
Date birthday = null;
try {
birthday = simpleDateFormat.parse(request.getParameter("birthday"));
} catch (ParseException e) {
e.printStackTrace();
} student.setId(id);
student.setStudent_id(student_id);
student.setName(name);
student.setAge(age);
student.setSex(sex);
student.setBirthday(birthday); studentService.updateStudent(student);
return "redirect:listStudent";
}
}

StudentService

package com.kikyo.service;

import com.kikyo.entity.Student;

import java.util.List;

public interface StudentService {

    /**
* 获取到 Student 的总数
* @return
*/
int getTotal(); /**
* 增加一条数据
* @param student
*/
void addStudent(Student student); /**
* 删除一条数据
* @param id
*/
void deleteStudent(int id); /**
* 更新一条数据
* @param student
*/
void updateStudent(Student student); /**
* 找到一条数据
* @param id
* @return
*/
Student getStudent(int id); /**
* 列举出从 start 位置开始的 count 条数据
* @param start
* @param count
* @return
*/
List<Student> list(int start, int count);
}

StudentServiceImpl

package com.kikyo.service;

import com.kikyo.dao.StudentDao;
import com.kikyo.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import java.util.List; @Service
public class StudentServiceImpl implements StudentService { @Autowired
StudentDao studentDao; public int getTotal() {
return studentDao.getTotal();
} public void addStudent(Student student) {
studentDao.addStudent(student);
} public void deleteStudent(int id) {
studentDao.deleteStudent(id);
} public void updateStudent(Student student) {
studentDao.updateStudent(student);
} public Student getStudent(int id) {
return studentDao.getStudent(id);
} public List<Student> list(int start, int count) {
return studentDao.list(start, count);
}
}

StudentDao

package com.kikyo.dao;

import com.kikyo.entity.Student;

import java.util.List;

public interface StudentDao {
int getTotal();
void addStudent(Student student);
void deleteStudent(int id);
void updateStudent(Student student);
Student getStudent(int id);
List<Student> list(int start, int count);
}

StudentDao.xml

<?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"> <!-- 将namespace的值设置为DAO类对应的路径 -->
<mapper namespace="com.kikyo.dao.StudentDao"> <!-- 查询数据条目 -->
<select id="getTotal" resultType="int">
SELECT COUNT(*) FROM student
</select> <!-- 增加一条数据 -->
<insert id="addStudent" parameterType="Student">
INSERT INTO student VALUES(NULL, #{student_id}, #{name}, #{age}, #{sex}, #{birthday})
</insert> <!-- 删除一条数据 -->
<delete id="deleteStudent" parameterType="int">
DELETE FROM student WHERE id = #{id}
</delete> <!-- 更新一条数据 -->
<update id="updateStudent" parameterType="Student">
UPDATE student SET student_id = #{student_id}, name = #{name},
age = #{age}, sex = #{sex}, birthday = #{birthday} WHERE id = #{id}
</update> <!-- 查询一条数据 -->
<select id="getStudent" resultMap="student" parameterType="int">
SELECT * FROM student WHERE id = #{id}
</select> <resultMap id="student" type="student">
<id column="id" property="id"/>
<result column="student_id" property="student_id"/>
<result column="name" property="name"/>
<result column="age" property="age"/>
<result column="sex" property="sex"/>
<result column="birthday" property="birthday" javaType="java.sql.Date"/>
</resultMap> <!-- 查询从start位置开始的count条数据-->
<select id="list" resultMap="student">
SELECT * FROM student ORDER BY student_id desc limit #{param1}, #{param2}
</select>
</mapper>

Student

package com.kikyo.entity;

import java.util.Date;

public class Student {

    private int id;
private int student_id;
private String name;
private int age;
private String sex;
private Date birthday; public int getId() {
return id;
} public void setId(int id) {
this.id = id;
} public int getStudent_id() {
return student_id;
} public void setStudent_id(int student_id) {
this.student_id = student_id;
} public String getName() {
return name;
} public void setName(String name) {
this.name = name;
} public int getAge() {
return age;
} public void setAge(int age) {
this.age = age;
} public String getSex() {
return sex;
} public void setSex(String sex) {
this.sex = sex;
} public Date getBirthday() {
return birthday;
} public void setBirthday(Date birthday) {
this.birthday = birthday;
}
}

Page

package com.kikyo.util;

public class Page {

    int start;      // 开始数据
int count; // 每一页的数量
int total; // 总共的数据量 public Page(int start, int count) {
super();
this.start = start;
this.count = count;
} public boolean isHasPreviouse() {
if (start == 0)
return false;
return true;
} public boolean isHasNext() {
if (start == getLast())
return false;
return true;
} public int getTotalPage() {
int totalPage;
// 假设总数是50,是能够被5整除的,那么就有10页
if (0 == total % count)
totalPage = total / count;
// 假设总数是51,不能够被5整除的,那么就有11页
else
totalPage = total / count + 1; if (0 == totalPage)
totalPage = 1;
return totalPage; } public int getLast() {
int last;
// 假设总数是50,是能够被5整除的,那么最后一页的开始就是40
if (0 == total % count)
last = total - count;
// 假设总数是51,不能够被5整除的,那么最后一页的开始就是50
else
last = total - total % count; last = last < 0 ? 0 : last;
return last;
} public int getStart() {
return start;
} public void setStart(int start) {
this.start = start;
} public int getCount() {
return count;
} public void setCount(int count) {
this.count = count;
} public int getTotal() {
return total;
} public void setTotal(int total) {
this.total = total;
}
}

学生管理系统(SSM简易版)总结

StudentManagerSSM的更多相关文章

  1. 学生管理系统(SSM简易版)总结

    之前用 Servlet + JSP 实现了一个简易版的学生管理系统,在学习了 SSM 框架之后,我们来对之前写过的项目重构一下! 技术准备 为了完成这个项目,需要掌握如下技术: Java 基础知识 前 ...

  2. vue+SSM验证码实现

    源码:https://github.com/HannahLihui/StudentManager-SSM/tree/master/SSM-git/StudentManager-SSM-master 1 ...

  3. Spring SSM 框架

    IDEA 整合 SSM 框架学习 http://www.cnblogs.com/wmyskxz/p/8916365.html 认识 Spring 框架 更多详情请点击这里:这里 Spring 框架是 ...

随机推荐

  1. QT(mingw) 编译 boost

    参考链接 :https://www.cnblogs.com/zhangnianyong/p/6546712.html Qt为mingw 5.8.0.Boost为1.62.0. 1.安装qt-opens ...

  2. 【转载】Java开发中的23种设计模式

    转自:http://zz563143188.iteye.com/blog/1847029 一.设计模式的分类 总体来说设计模式分为三大类: 创建型模式,共五种:工厂方法模式.抽象工厂模式.单例模式.建 ...

  3. 95. 不同的二叉搜索树 II、96. 不同的二叉搜索树

    95 Tg:递归 这题不能算DP吧,就是递归 一个问题:每次的树都要新建,不能共用一个根节点,否则下次遍历对根左右子树的改动会把已经放进结果数组中的树改掉.. class Solution: def ...

  4. js加密(五)产品目录

    1.  url:http://www.300600900.cn/ 2. target: 3. 简单分析 偶然发现,这个网站的加密,和landChina加密一模一样,js函数的名字都一样...所以,只贴 ...

  5. office2013激活工具,可以激活新版本office 2013

    耽误一上午没激活成功,最后还是找到了激活文件KMSpico v9.0.6.zip 链接:https://pan.baidu.com/s/1WEyJm8kVnqDONRJRHTRQiQ 提取码:4h45 ...

  6. 微信小程序使用wxParse实现接入富文本编辑

    简介 微信小程序中比如活动说明,简介这样的图文介绍说明页面,后台通常配置成富文本编辑框,由后台直接输入内容,然后在小程序界面展现. 但是富文本编辑提取到内容是html格式的,写法与小程序的wxml并不 ...

  7. Ansible - iventory

    概述 简单的 ansible 准备 ansible 安装 免密登录 约定 因为重点是 iventory, 所以只使用最简单的模块 ping 1. host-simple 概述 简单版 hosts 文件 ...

  8. CSS学习(2)Id和Class选择器

    id 选择器 id 选择器可以为标有特定 id 的 HTML 元素指定特定的样式. HTML元素以id属性来设置id选择器,CSS 中 id 选择器以 "#" 来定义. 以下的样式 ...

  9. kafka集群搭建记录

    本文记录搭建kafka搭建过程. 一.硬件机器介绍 192.168.183.195 master-node 192.168.183.194 data-node1 192.168.183.196 dat ...

  10. 04hive查询

    详细文档查看:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+Select 一. 基本查询(SELECT …FROM) ...