idea完整小项目图书馆里系统框架从无到有整合,配置SSM框架模板

李飞飞创业公司World Labs:引领AI新方向的“大世界模型” 随着人工智能的不断进步,AI领域涌现了许多新兴技术和研究方向。在这其中,李飞飞创办的World Labs凭借其独特的“空间智能”和“大世界模型”(Large World Model, LWM)理念,迅速成为焦点。尤其是在获得了2.3亿美元的融资后,World Labs的愿景引发了广泛关注。这篇文章将深入探讨World Labs的核心技术与战略,探索其在AI领域的独特贡献以及未来的潜在影响。 阅读详情

整合SSM

环境要求
环境:

IDEA

MySQL 5.7.19

Tomcat 9

Maven 3.6

要求:

需要熟练掌握MySQL数据库,Spring,JavaWeb及MyBatis知识,简单的前端知识;

数据库环境
创建一个存放书籍数据的数据库表

CREATE DATABASE `ssmbuild`;

USE `ssmbuild`;

DROP TABLE IF EXISTS `books`;

CREATE TABLE `books` (
`bookID` INT(10) NOT NULL AUTO_INCREMENT COMMENT '书id',
`bookName` VARCHAR(100) NOT NULL COMMENT '书名',
`bookCounts` INT(11) NOT NULL COMMENT '数量',
`detail` VARCHAR(200) NOT NULL COMMENT '描述',
KEY `bookID` (`bookID`)
) ENGINE=INNODB DEFAULT CHARSET=utf8

INSERT  INTO `books`(`bookID`,`bookName`,`bookCounts`,`detail`)VALUES 
(1,'Java',1,'从入门到放弃'),
(2,'MySQL',10,'从删库到跑路'),
(3,'Linux',5,'从进门到进牢');

基本环境搭建
1、新建一Maven项目!ssmbuild , 添加web的支持

2、导入相关的pom依赖!

<dependencies>
   <!--Junit-->
   <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <version>4.12</version>
   </dependency>
   <!--数据库驱动-->
   <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
       <version>5.1.47</version>
   </dependency>
   <!-- 数据库连接池 -->
   <dependency>
       <groupId>com.mchange</groupId>
       <artifactId>c3p0</artifactId>
       <version>0.9.5.2</version>
   </dependency>

   <!--Servlet - JSP -->
   <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>servlet-api</artifactId>
       <version>2.5</version>
   </dependency>
   <dependency>
       <groupId>javax.servlet.jsp</groupId>
       <artifactId>jsp-api</artifactId>
       <version>2.2</version>
   </dependency>
   <dependency>
       <groupId>javax.servlet</groupId>
       <artifactId>jstl</artifactId>
       <version>1.2</version>
   </dependency>

   <!--Mybatis-->
   <dependency>
       <groupId>org.mybatis</groupId>
       <artifactId>mybatis</artifactId>
       <version>3.5.2</version>
   </dependency>
   <dependency>
       <groupId>org.mybatis</groupId>
       <artifactId>mybatis-spring</artifactId>
       <version>2.0.2</version>
   </dependency>

   <!--Spring-->
   <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webmvc</artifactId>
       <version>5.1.9.RELEASE</version>
   </dependency>
   <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-jdbc</artifactId>
       <version>5.1.9.RELEASE</version>
   </dependency>
</dependencies>

3、Maven资源过滤设置

<build>
   <resources>
       <resource>
           <directory>src/main/java</directory>
           <includes>
               <include>**/*.properties</include>
               <include>**/*.xml</include>
           </includes>
           <filtering>false</filtering>
       </resource>
       <resource>
           <directory>src/main/resources</directory>
           <includes>
               <include>**/*.properties</include>
               <include>**/*.xml</include>
           </includes>
           <filtering>false</filtering>
       </resource>
   </resources>
</build>

4、建立基本结构和配置框架!

com.kuang.pojo

com.kuang.dao

com.kuang.service

com.kuang.controller

mybatis-config.xml

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
       PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
       "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>

</configuration>
applicationContext.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"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

</beans>

Mybatis层编写
1、数据库配置文件 database.properties

jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/ssmbuild?useSSL=true&useUnicode=true&characterEncoding=utf8
jdbc.username=root
jdbc.password=123456
2、IDEA关联数据库

3、编写MyBatis的核心配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
       PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
       "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
   
   <typeAliases>
       <package name="com.kuang.pojo"/>
   </typeAliases>
   <mappers>
       <mapper resource="com/kuang/dao/BookMapper.xml"/>
   </mappers>

</configuration>

4、编写数据库对应的实体类 com.kuang.pojo.Books

使用lombok插件!

package com.kuang.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Books {
   
   private int bookID;
   private String bookName;
   private int bookCounts;
   private String detail;
   
}

5、编写Dao层的 Mapper接口!

package com.kuang.dao;

import com.kuang.pojo.Books;
import java.util.List;

public interface BookMapper {

   //增加一个Book
   int addBook(Books book);

   //根据id删除一个Book
   int deleteBookById(int id);

   //更新Book
   int updateBook(Books books);

   //根据id查询,返回一个Book
   Books queryBookById(int id);

   //查询全部Book,返回list集合
   List<Books> queryAllBook();

}

6、编写接口对应的 Mapper.xml 文件。需要导入MyBatis的包;

<?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="com.kuang.dao.BookMapper">

   <!--增加一个Book-->
   <insert id="addBook" parameterType="Books">
      insert into ssmbuild.books(bookName,bookCounts,detail)
      values (#{bookName}, #{bookCounts}, #{detail})
   </insert>

   <!--根据id删除一个Book-->
   <delete id="deleteBookById" parameterType="int">
      delete from ssmbuild.books where bookID=#{bookID}
   </delete>

   <!--更新Book-->
   <update id="updateBook" parameterType="Books">
      update ssmbuild.books
      set bookName = #{bookName},bookCounts = #{bookCounts},detail = #{detail}
      where bookID = #{bookID}
   </update>

   <!--根据id查询,返回一个Book-->
   <select id="queryBookById" resultType="Books">
      select * from ssmbuild.books
      where bookID = #{bookID}
   </select>

   <!--查询全部Book-->
   <select id="queryAllBook" resultType="Books">
      SELECT * from ssmbuild.books
   </select>

</mapper>

7、编写Service层的接口和实现类

接口:

package com.kuang.service;

import com.kuang.pojo.Books;

import java.util.List;

//BookService:底下需要去实现,调用dao层
public interface BookService {
   //增加一个Book
   int addBook(Books book);
   //根据id删除一个Book
   int deleteBookById(int id);
   //更新Book
   int updateBook(Books books);
   //根据id查询,返回一个Book
   Books queryBookById(int id);
   //查询全部Book,返回list集合
   List<Books> queryAllBook();
}

实现类:

package com.kuang.service;

import com.kuang.dao.BookMapper;
import com.kuang.pojo.Books;
import java.util.List;

public class BookServiceImpl implements BookService {

   //调用dao层的操作,设置一个set接口,方便Spring管理
   private BookMapper bookMapper;

   public void setBookMapper(BookMapper bookMapper) {
       this.bookMapper = bookMapper;
  }
   
   public int addBook(Books book) {
       return bookMapper.addBook(book);
  }
   
   public int deleteBookById(int id) {
       return bookMapper.deleteBookById(id);
  }
   
   public int updateBook(Books books) {
       return bookMapper.updateBook(books);
  }
   
   public Books queryBookById(int id) {
       return bookMapper.queryBookById(id);
  }
   
   public List<Books> queryAllBook() {
       return bookMapper.queryAllBook();
  }
}

OK,到此,底层需求操作编写完毕!

Spring层
1、配置Spring整合MyBatis,我们这里数据源使用c3p0连接池;

2、我们去编写Spring整合Mybatis的相关的配置文件;spring-dao.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"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/context
       https://www.springframework.org/schema/context/spring-context.xsd">

   <!-- 配置整合mybatis -->
   <!-- 1.关联数据库文件 -->
   <context:property-placeholder location="classpath:database.properties"/>

   <!-- 2.数据库连接池 -->
   <!--数据库连接池
       dbcp 半自动化操作 不能自动连接
       c3p0 自动化操作(自动的加载配置文件 并且设置到对象里面)
   -->
   <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}"/>

       <!-- c3p0连接池的私有属性 -->
       <property name="maxPoolSize" value="30"/>
       <property name="minPoolSize" value="10"/>
       <!-- 关闭连接后不自动commit -->
       <property name="autoCommitOnClose" value="false"/>
       <!-- 获取连接超时时间 -->
       <property name="checkoutTimeout" value="10000"/>
       <!-- 当获取连接失败重试次数 -->
       <property name="acquireRetryAttempts" value="2"/>
   </bean>

   <!-- 3.配置SqlSessionFactory对象 -->
   <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
       <!-- 注入数据库连接池 -->
       <property name="dataSource" ref="dataSource"/>
       <!-- 配置MyBaties全局配置文件:mybatis-config.xml -->
       <property name="configLocation" value="classpath:mybatis-config.xml"/>
   </bean>

   <!-- 4.配置扫描Dao接口包,动态实现Dao接口注入到spring容器中 -->
   <!--解释 :https://www.cnblogs.com/jpfss/p/7799806.html-->
   <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
       <!-- 注入sqlSessionFactory -->
       <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"/>
       <!-- 给出需要扫描Dao接口包 -->
       <property name="basePackage" value="com.kuang.dao"/>
   </bean>

</beans>

3、Spring整合service层

<?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"
      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">

   <!-- 扫描service相关的bean -->
   <context:component-scan base-package="com.kuang.service" />

   <!--BookServiceImpl注入到IOC容器中-->
   <bean id="BookServiceImpl" class="com.kuang.service.BookServiceImpl">
       <property name="bookMapper" ref="bookMapper"/>
   </bean>

   <!-- 配置事务管理器 -->
   <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
       <!-- 注入数据库连接池 -->
       <property name="dataSource" ref="dataSource" />
   </bean>

</beans>

Spring层搞定!再次理解一下,Spring就是一个大杂烩,一个容器!对吧!

SpringMVC层
1、web.xml

<?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"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
        version="4.0">

   <!--DispatcherServlet-->
   <servlet>
       <servlet-name>DispatcherServlet</servlet-name>
       <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
       <init-param>
           <param-name>contextConfigLocation</param-name>
           <!--一定要注意:我们这里加载的是总的配置文件,之前被这里坑了!-->  
           <param-value>classpath:applicationContext.xml</param-value>
       </init-param>
       <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
       <servlet-name>DispatcherServlet</servlet-name>
       <url-pattern>/</url-pattern>
   </servlet-mapping>

   <!--encodingFilter-->
   <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>
   
   <!--Session过期时间-->
   <session-config>
       <session-timeout>15</session-timeout>
   </session-config>
   
</web-app>

2、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
   https://www.springframework.org/schema/mvc/spring-mvc.xsd">

   <!-- 配置SpringMVC -->
   <!-- 1.开启SpringMVC注解驱动 -->
   <mvc:annotation-driven />
   <!-- 2.静态资源默认servlet配置-->
   <mvc:default-servlet-handler/>

   <!-- 3.配置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/jsp/" />
       <property name="suffix" value=".jsp" />
   </bean>

   <!-- 4.扫描web相关的bean -->
   <context:component-scan base-package="com.kuang.controller" />

</beans>

3、Spring配置整合文件,applicationContext.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"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">

   <import resource="spring-dao.xml"/>
   <import resource="spring-service.xml"/>
   <import resource="spring-mvc.xml"/>
   
</beans>

配置文件,暂时结束!Controller 和 视图层编写

1、BookController 类编写 , 方法一:查询全部书籍

@Controller
@RequestMapping("/book")
public class BookController {

   @Autowired
   @Qualifier("BookServiceImpl")
   private BookService bookService;

   @RequestMapping("/allBook")
   public String list(Model model) {
       List<Books> list = bookService.queryAllBook();
       model.addAttribute("list", list);
       return "allBook";
  }
}

2、编写首页 index.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE HTML>
<html>
<head>
   <title>首页</title>
   <style type="text/css">
       a {
           text-decoration: none;
           color: black;
           font-size: 18px;
      }
       h3 {
           width: 180px;
           height: 38px;
           margin: 100px auto;
           text-align: center;
           line-height: 38px;
           background: deepskyblue;
           border-radius: 4px;
      }
   </style>
</head>
<body>

<h3>
   <a href="${pageContext.request.contextPath}/book/allBook">点击进入列表页</a>
</h3>
</body>
</html>
3、书籍列表页面 allbook.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
   <title>书籍列表</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <!-- 引入 Bootstrap -->
   <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container">

   <div class="row clearfix">
       <div class="col-md-12 column">
           <div class="page-header">
               <h1>
                   <small>书籍列表 —— 显示所有书籍</small>
               </h1>
           </div>
       </div>
   </div>

   <div class="row">
       <div class="col-md-4 column">
           <a class="btn btn-primary" href="${pageContext.request.contextPath}/book/toAddBook">新增</a>
       </div>
   </div>

   <div class="row clearfix">
       <div class="col-md-12 column">
           <table class="table table-hover table-striped">
               <thead>
               <tr>
                   <th>书籍编号</th>
                   <th>书籍名字</th>
                   <th>书籍数量</th>
                   <th>书籍详情</th>
                   <th>操作</th>
               </tr>
               </thead>

               <tbody>
               <c:forEach var="book" items="${requestScope.get('list')}">
                   <tr>
                       <td>${book.getBookID()}</td>
                       <td>${book.getBookName()}</td>
                       <td>${book.getBookCounts()}</td>
                       <td>${book.getDetail()}</td>
                       <td>
                           <a href="${pageContext.request.contextPath}/book/toUpdateBook?id=${book.getBookID()}">更改</a> |
                           <a href="${pageContext.request.contextPath}/book/del/${book.getBookID()}">删除</a>
                       </td>
                   </tr>
               </c:forEach>
               </tbody>
           </table>
       </div>
   </div>
</div>

4、BookController 类编写 , 方法二:添加书籍

@RequestMapping("/toAddBook")
public String toAddPaper() {
   return "addBook";
}

@RequestMapping("/addBook")
public String addPaper(Books books) {
   System.out.println(books);
   bookService.addBook(books);
   return "redirect:/book/allBook";
}

5、添加书籍页面:addBook.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
   <title>新增书籍</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <!-- 引入 Bootstrap -->
   <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

   <div class="row clearfix">
       <div class="col-md-12 column">
           <div class="page-header">
               <h1>
                   <small>新增书籍</small>
               </h1>
           </div>
       </div>
   </div>
   <form action="${pageContext.request.contextPath}/book/addBook" method="post">
      书籍名称:<input type="text" name="bookName"><br><br><br>
      书籍数量:<input type="text" name="bookCounts"><br><br><br>
      书籍详情:<input type="text" name="detail"><br><br><br>
       <input type="submit" value="添加">
   </form>

</div>

6、BookController 类编写 , 方法三:修改书籍

@RequestMapping("/toUpdateBook")
public String toUpdateBook(Model model, int id) {
   Books books = bookService.queryBookById(id);
   System.out.println(books);
   model.addAttribute("book",books );
   return "updateBook";
}

@RequestMapping("/updateBook")
public String updateBook(Model model, Books book) {
   System.out.println(book);
   bookService.updateBook(book);
   Books books = bookService.queryBookById(book.getBookID());
   model.addAttribute("books", books);
   return "redirect:/book/allBook";
}

7、修改书籍页面 updateBook.jsp

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
   <title>修改信息</title>
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <!-- 引入 Bootstrap -->
   <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div class="container">

   <div class="row clearfix">
       <div class="col-md-12 column">
           <div class="page-header">
               <h1>
                   <small>修改信息</small>
               </h1>
           </div>
       </div>
   </div>

   <form action="${pageContext.request.contextPath}/book/updateBook" method="post">
       <input type="hidden" name="bookID" value="${book.getBookID()}"/>
      书籍名称:<input type="text" name="bookName" value="${book.getBookName()}"/>
      书籍数量:<input type="text" name="bookCounts" value="${book.getBookCounts()}"/>
      书籍详情:<input type="text" name="detail" value="${book.getDetail() }"/>
       <input type="submit" value="提交"/>
   </form>

</div>

8、BookController 类编写 , 方法四:删除书籍

@RequestMapping("/del/{bookId}")
public String deleteBook(@PathVariable("bookId") int id) {
   bookService.deleteBookById(id);
   return "redirect:/book/allBook";
}

配置Tomcat,进行运行!

免费替代Cursor!TRAE中文版这些隐藏功能90%的人不知道 本文深度评测了免费AI编程工具TRAE中文版,揭示其超越代码补全的隐藏功能。重点介绍了其SOLO模式如何重塑从需求到部署的全流程开发,以及对微信小程序、Taro、Ant Design Pro等国产技术栈的深度适配能力,为中文开发者提供了高度本地化的高效解决方案。 阅读详情

相关推荐

C++继承与多态 - 继承多态原理01

C++继承多态原理讲解

大秦坑王的专栏 2986

SSM实现增删改查代码篇超级详细

ssm全称Spring+SpringMVC+MyBatis,是目前比较主流的Java EE企业级框架,适用于搭建各种大型的企业级应用系统。

ct341688的博客 7629

离线安装PlutoSDR硬件支持包全攻略:没有MathWorks账号也能搞定MATLAB集成

本文详细介绍了在没有MathWorks账号和网络环境的情况下,如何离线安装PlutoSDR硬件支持包并实现MATLAB集成的完整解决方案。从驱动安装、设备识别到MATLAB支持包的离线部署,提供了全面的步骤指导和常见问题排查方法,特别适合高校实验室、军工单位等内网环境使用。

js777的博客 274

ssm框架增删改查(项目整合)

文章目录本篇文章中,介绍的是最简单,基础的增删改查的功能!表名:SysUser 注意: 二,创建Mapper接口 SysUserMapper :接口类 准备mapper.xml文件 SysUserMapper.xml 四,创建service接口类 SysUserService 五,写impl类 SysUserServiceImpl 六,创建Controller测试类 SysUserController 七,创建需要的页面 add.jsp list.jsp update.jsp查询页面list.jsp 删除修

passerby的博客 2550

Unity类银河战士恶魔城学习总结(P162 Improve skeleton提升敌人的效果)

为敌人添加了快慢刀

suzh1qian的博客 579

STM32中RS485方向控制引脚应用详解

深入解析STM32如何通过GPIO控制RS485通讯的方向引脚,实现半双工通信的精准切换。重点讲解硬件连接与软件时序配合,确保rs485通讯稳定可靠,适用于工业控制等实际场景。

weixin_42451850的博客 406

ssm整合(实现一个小项目的增删改查)

ssm整合就是把spring框架springmvc框架和mybatis框架整合在一起724系统架构图前端框架系统构架图JSPjQuery框架HTML5、CSS3Web框架:Spring MVC Spring Core基于IoC和AOP的处理方式统一管理所有的JavaBean框架数据存储:MySQL。

zky__sch的博客 2247

2026年软考高级网络规划设计师备考指南

在国家网络安全法律法规和政策的指导下,能够依据网络技术发展的趋势进行计算机网络领域的需求分析、规划设计、部署实施、评测、运行维护等工作。 在需求分析阶段,写出网络系统需求规格说明书;在规划设计阶段,完成逻辑结构设计、物理结构设计,选用适宜的网络设备,按照标准规范编写系统设计文档及项目开发计划;在部署实施阶段,组织项目施工,对项目实施过程进行质量控制、进度控制、成本管理,能具体指导项目实施;在评测运维阶段,能根据相关标准和规范对网络进行评估测试,能制定运行维护、故障分析与处理机制,确保网络提供正常服务;

鹿鸣天涯 1万+

SSM整合项目(增删改查)

注意:我们再做项目的时候,回出现很多细节的小问题,如果全部功能都操作完成之后,再运行项目的话,可能回出现问题,这样我们寻找问题的时候会有些困难!本篇文章中,介绍的是最简单,基础的增删改查的功能!实体类:内含最基础的方法,一些基本的属性提示:我们需要两个实体类 Deparment【部门】 作为外键部门 Employee【员工】 作为主表①Department ②Employee EmployeeMapper接口类 三、准备mapper.x

weixin_54721820的博客 2978

利用requests库下载bilibili字幕文件

文章目录1. 前言2. 程序下载大法好2.1 挖掘思路2.2 核心知识点2.3 汇总代码 1. 前言   之前的博客介绍了使用工具下载B站视频,但美中不足的是无法下载字幕。为了提高效率,将下载字幕的工作用程序自动化处理。 2. 程序下载大法好 2.1 挖掘思路   在谷歌浏览器中按下F12,打开谷歌开发者工具。搜索subtitle,则会得到一个json文件,如下图所示:   在网页中空白位置点击查看网页源代码,然后通过搜索(Ctrl+f)查找subtitle,则会发现在subtitle_url中包含了对应

herosunly的博客 4万+

华为OD机试 - 魔法收积木 - 二进制(Java 新系统 200分)

华为OD机试 新系统 题库疯狂收录中,刷题。

学Java,找哪吒 451

SpringMVC-08-整合SSM之CRUD

查询书籍功能 完善Controller:BookController @Controller @RequestMapping("/book") public class BookController { //coontroller层调service层 @Autowired @Qualifier("BookServiceImpl") private BookService bookService; //查询全部的书籍,并且返回到书籍展示也命啊 @Req.

HUBA_yosa的博客 457

【AI黑话日日新】什么是对比学习?

模型效果高度依赖大规模、高质量的人工标注数据。数据标注不仅成本高昂、周期漫长,在医疗、工业、小众垂类等场景中,甚至难以获取足量的标注样本,严重限制了模型的泛化能力与应用边界。自监督学习的出现,为解决这一问题提供了全新思路——无需人工标注标签,而是利用数据自身的结构与内在关联,构建自生成的监督信号完成模型预训练,再通过微调适配下游任务。在众多自监督学习方法中,对比学习(Contrastive Learning)

专注:太空算力、AI infra、异构调度、大模型成本工程 732

java_ssm103红枫图书馆自习室座位预约管理系统_idea项目源码

红枫图书馆自习室座位预约管理系统基于Java SSM框架(Spring+Spring MVC+MyBatis)开发,采用B/S架构实现图书馆自习室座位的在线预约与管理。系统设计遵循MVC模式,前端使用JSP、Bootstrap和jQuery构建响应式界面,后端依托Tomcat服务器与MySQL数据库,提供高效、稳定的服务。项目适用于高校图书馆或公共自习场所,解决传统排队占座带来的资源分配不均问题。系统核心功能分为用户端和管理端。用户端支持注册登录、座位查询、实时预约、取消预约、使用记录查看及个人信息管理。

qq2295116502的博客 540

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

springboot_ssm884高校图书馆借阅座位预约管理系统系统ssm

高校图书馆借阅座位预约管理系统基于SpringBoot和SSM(Spring+SpringMVC+MyBatis)框架开发,旨在解决图书馆座位资源紧张、预约效率低下及管理混乱等问题。系统采用B/S架构,前端使用HTML、CSS、JavaScript及Vue.js等技术实现动态交互,后端通过SpringBoot简化配置,整合SSM框架实现业务逻辑与数据持久化。MySQL数据库存储用户信息、座位数据、预约记录等,保证数据安全性与一致性。系统功能模块包括用户管理、座位管理、预约管理、公告管理及统计分析。

QQ_188083800的博客 890

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

java_ssm32图书馆读者行为分析系统_idea项目源码

本系统采取了一系列的设计原则,主要目的是为了系统的功能设计,还有管理人员在后期对系统维护时的方便,以及使学生能够简易的操作。最重要的设计原则包括:简单性、针对性、实用性、一致性、先进性。网站整体的页面布局,在不同的界面之间,img里的图片的放置位置以及大小都应该有严格的一致性。变量命名规则应该具有统一性1、学习系统开发和设计的技术相关知识和工作流程;2、学习使用 IDEA 工具编辑前后台代码;3、学习使用springboot-ssm框架实现系统的开发;

2501_91488339的博客 281

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

java_ssm50大学图书借阅管理系统前台_idea项目源码

Java_SSM50大学图书借阅管理系统是一个基于SSM(Spring+SpringMVC+MyBatis)框架开发的Web应用,专为高校图书馆设计。系统分为前台用户模块和后台管理模块,前台面向学生和教职工,提供图书查询、借阅、归还等功能。项目采用IDEA开发,整合了MySQL数据库、Bootstrap前端框架及Ajax异步交互技术,实现高效、响应式的图书管理服务。本系统采取了一系列的设计原则,主要目的是为了系统的功能设计,还有管理人员在后期对系统维护时的方便,以及使学生能够简易的操作。

mind526的博客 508

springboot_ssm图书馆读者行为分析系统java论文

本毕业设计项目基于B/S结构模式,采用idea开发环境,建模工具Visio,以及关系型数据库MySQL。系统采用前后端分离的模式进行开发。前端开发负责页面的编写及数据的渲染。后端开发负责提供API(接口)。前后端采用指定的API接口进行交互。开发本系统具体的技术路线如下:(1)熟练掌握并使用Microsoft Office Visio建模工具,绘制系统相关的工作流程图,实体联系图等。(2)学习并熟识MySQL数据库的使用,设计系统相关的数据库信息,将其转换为MySQL数据库能够识别和存储的表格形式。

mind526的博客 744

java_ssm123高校图书借阅管理系统设计_idea项目源码

高校图书借阅管理系统基于Java SSM框架(Spring+SpringMVC+MyBatis)开发,采用B/S架构,实现图书管理的数字化与智能化。系统以MySQL为数据库,整合了用户管理、图书管理、借阅归还、数据统计等核心功能模块,提升图书馆管理效率与服务体验。系统采用三层架构设计,表现层通过SpringMVC处理前端请求,业务逻辑层由Spring容器管理事务与服务,数据持久层通过MyBatis实现高效数据库操作。

我的个人的博客 639

springboot_ssm红枫图书馆自习室座位预约管理系统java论文

本毕业设计项目基于B/S结构模式,采用idea开发环境,建模工具Visio,以及关系型数据库MySQL。系统采用前后端分离的模式进行开发。前端开发负责页面的编写及数据的渲染。后端开发负责提供API(接口)。前后端采用指定的API接口进行交互。开发本系统具体的技术路线如下:(1)熟练掌握并使用Microsoft Office Visio建模工具,绘制系统相关的工作流程图,实体联系图等。(2)学习并熟识MySQL数据库的使用,设计系统相关的数据库信息,将其转换为MySQL数据库能够识别和存储的表格形式。

QQ_1963288475的博客 842

java-SSM350的图书馆图书借阅管理系统x1x74-springboot

Java-SSM350图书馆图书借阅管理系统基于SpringBoot框架开发,整合了Spring、SpringMVC和MyBatis(SSM)技术栈,旨在实现图书馆图书管理的数字化与自动化。系统采用B/S架构,支持多用户角色(如管理员、读者),涵盖图书借阅、归还、查询、统计等核心功能模块,提升图书馆运营效率。本系统采取了一系列的设计原则,主要目的是为了系统的功能设计,还有管理人员在后期对系统维护时的方便,以及使学生能够简易的操作。最重要的设计原则包括:简单性、针对性、实用性、一致性、先进性。

QQ_511008285的博客 531

java_ssm31图书借阅读书心得借书卡管理系统的设计与实现_idea项目源码

本系统采取了一系列的设计原则,主要目的是为了系统的功能设计,还有管理人员在后期对系统维护时的方便,以及使学生能够简易的操作。最重要的设计原则包括:简单性、针对性、实用性、一致性、先进性。网站整体的页面布局,在不同的界面之间,img里的图片的放置位置以及大小都应该有严格的一致性。变量命名规则应该具有统一性1、学习系统开发和设计的技术相关知识和工作流程;2、学习使用 IDEA 工具编辑前后台代码;3、学习使用springboot-ssm框架实现系统的开发;

2501_91488339的博客 365

python+django/flask的图书馆管理系统vue

随着智慧校园建设的推进,图书馆作为重要组成部分,亟需通过数字化转型实现管理升级。开发一套集成馆藏管理、读者服务、数据统计、资源共享等功能的图书馆管理系统,既能解决人工操作的低效问题,又能通过线上线下融合服务提升读者体验,同时为图书馆的资源优化、服务创新提供数据支持,成为推动图书馆向智能化、现代化转型的关键举措。

Q_Q511008285的博客 1043

计算机毕业设计ssm校园招聘管理信息系统 基于SSM框架的校园招聘管理系统开发与实现 SSM技术栈下的校园招聘信息管理平台设计

用户管理:支持管理员、企业和学生等多角色登录,提供注册、登录、权限分配等功能。招聘会管理:管理员可以发布招聘会信息,包括招聘会名称、举办时间、地点、联系方式等;学生和企业可以查看招聘会详情。招聘岗位管理:企业可以发布招聘岗位,包括岗位名称、分类、行业、职位描述、薪资待遇等;学生可以搜索和查看岗位信息,并进行简历投递。简历投递管理:学生可以上传个人简历并投递至心仪的岗位;企业可以查看投递的简历并进行筛选。面试信息管理:企业可以发布面试通知,安排面试时间和地点;学生可以查看面试安排并确认面试结果。笔试信息管理。

皓霖学长毕设 1004

基于Java+SSM+Flask电子资源管理系统(源码+LW+调试文档+讲解等)/电子资源/管理系统/数字化资源/信息化/图书馆管理/在线资源/电子文件管理/文献管理/电子文档/数据资源管理

前端:Flask、Python Web框架,后端语言Python后端:Spring+SpringMVC+Mybatis数据库:MySQL、SQLServer开发工具:IDEA、Eclipse、Navicat等✌关于毕设项目技术实现问题讲解也可以给我留言咨询!!!Flask 的扩展生态丰富多样,为程序设计提供了极大的便利。无论是数据库连接、用户认证还是模板引擎的扩展,都可以根据项目需求进行灵活选择和集成。这使得程序设计者能够根据具体情况定制功能,而不必受限于框架的内置功能。

2401_88036107的博客 921

springboot_ssm808图书借阅挂失崔还系统功能全--论文

随着信息化技术的快速发展,图书馆管理系统逐渐从传统的手工管理模式向数字化、智能化方向转变。基于SpringBoot和SSM框架的图书借阅挂失催还系统,旨在提高图书馆的管理效率,优化读者的借阅体验。系统采用B/S架构,结合MySQL数据库,实现了图书管理、借阅管理、挂失管理、催还提醒等功能模块,为图书馆的日常运营提供了便捷的信息化支持。系统的主要功能包括图书信息的录入、查询与维护,借阅记录的动态管理,以及图书挂失与催还流程的自动化处理。

bishe288的博客 609
上一篇: 力扣LeetCode之替换所有的问号Java
下一篇: SSM小项目看图整合,保证能几分钟从无到有搭建出来
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值