SSM創建配置測試超級無敵詳細版本

来源:https://www.cnblogs.com/qy-blog/p/18053039
-Advertisement-
Play Games

1.創建 2.配置tomcat 3.創建webapp step01,war包 step02 創建web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xml ...


1.創建

image

2.配置tomcat

3.創建webapp

step01,war包

image

step02

image

image

創建web.xml

image

<?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">
</web-app>

4.構建SpringMVC

導入jar包

<!--springMVC-->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>5.3.23</version>
</dependency>

<!--servlet-->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>4.0.1</version>
    <scope>provided</scope>
</dependency>

web.xml配置DispacheServlet,核心攔截器

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

    <!--配置DispacheServlet,核心攔截器-->
    <servlet>
        <servlet-name>springmvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <!-- 切換目錄並改名 -->
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:springmvc.xml</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>springmvc</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>

springmvc.xml

image

<?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:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd
                           http://www.springframework.org/schema/util
                           http://www.springframework.org/schema/util/spring-util-4.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
                           http://www.springframework.org/schema/tx
                           http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
                           http://www.springframework.org/schema/aop
                           http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
                           ">
    <!--掃描Controller所在包,但是註意包下的類必須有@Controller或者@RestController-->
    <context:component-scan base-package="com.einmeer.controller"></context:component-scan>
</beans>

5.SpringIOC

創建配置文件applicationcontext.xml

image

<?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:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd
                           http://www.springframework.org/schema/util
                           http://www.springframework.org/schema/util/spring-util-4.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
                           http://www.springframework.org/schema/tx
                           http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
                           http://www.springframework.org/schema/aop
                           http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
                           ">

</beans>

配置監聽器,該監聽器的作用是在伺服器啟動的時候讀ioc配置文件

繼續在web.xml中添加

<!--為監聽器配置參數,目的是為了告訴監聽器,要讀的文件在哪-->
<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:applicationcontext.xml</param-value>
</context-param>
<!--配置監聽器讀applicationcontext.xml-->
<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

6.MyBatis

導入jar包

<!--MyBatis-->
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis</artifactId>
    <version>3.5.6</version>
</dependency>

<!--mysql-->
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>8.0.28</version>
</dependency>

<!--MyBatis Spring-->
<dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis-spring</artifactId>
    <version>2.0.6</version>
</dependency>

<!--orm關係映射-->
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>5.3.23</version>
</dependency>

<!--Druid連接池-->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>druid</artifactId>
    <version>1.2.8</version>
</dependency>

在MyConfig中創建3個bean,加入IOC

applicationcontext.xml

image

<!--掃描配置類所在的包-->
<context:component-scan base-package="com.einmeer.config"></context:component-scan>

MyConfig

package com.einmeer.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
* @author 芊嵛
* @date 2024/3/4
*/
@Configuration
public class MyConfig {

    /**
* 配置連接池
* @return
*/
    @Bean
    DataSource getDataSource(){
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://192.168.21.130:3306/test?useUnicode=true&characterEncoding=utf8");
        dataSource.setUsername("root");
        dataSource.setPassword("2459689935");;
        dataSource.setMinIdle(8);
        dataSource.setMaxActive(20);
        return dataSource;
    }

    @Bean
    SqlSessionFactoryBean getSqlSessionFactory(){
        SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
        bean.setDataSource(getDataSource());
        bean.setTypeAliasesPackage("com.einmeer.entity");
        return bean;
    }

    @Bean
    MapperScannerConfigurer getMapperScanner(){
        MapperScannerConfigurer bean = new MapperScannerConfigurer();
        bean.setBasePackage("com.einmeer.mapper");
        return bean;
    }
}

image

mapper.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">

<mapper namespace="換成上面介面的路徑">

</mapper>

7.簡化entity

下載lombok插件

image

導入jar

<!--lombok-->
<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.24</version>
    <scope>provided</scope>
</dependency>

8.截至到目前的配置整合

image

8.1MyConfig.java

package com.einmeer.config;

import com.alibaba.druid.pool.DruidDataSource;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;

/**
 * @author 芊嵛
 * @date 2024/3/4
 */
@Configuration
public class MyConfig {

    /**
     * 配置連接池
     *
     * @return
     */
    @Bean
    DataSource getDataSource() {
        DruidDataSource dataSource = new DruidDataSource();
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        dataSource.setUrl("jdbc:mysql://192.168.21.130:3306/test?useUnicode=true&characterEncoding=utf8");
        dataSource.setUsername("root");
        dataSource.setPassword("2459689935");
        ;
        dataSource.setMinIdle(8);
        dataSource.setMaxActive(20);
        return dataSource;
    }

    @Bean
    SqlSessionFactoryBean getSqlSessionFactory() {
        SqlSessionFactoryBean bean = new SqlSessionFactoryBean();
        bean.setDataSource(getDataSource());
        // 包別名,不寫的話,mapper中返回值類型要寫全
        bean.setTypeAliasesPackage("com.einmeer.entity");
        return bean;
    }

    @Bean
    MapperScannerConfigurer getMapperScanner() {
        MapperScannerConfigurer bean = new MapperScannerConfigurer();
        // mapper別名
        bean.setBasePackage("com.einmeer.mapper");
        return bean;
    }
}

8.2applicationcontext.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:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd
                           http://www.springframework.org/schema/util
                           http://www.springframework.org/schema/util/spring-util-4.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
                           http://www.springframework.org/schema/tx
                           http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
                           http://www.springframework.org/schema/aop
                           http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
                           ">

    <!--掃描配置類所在的包-->
    <context:component-scan base-package="com.einmeer.config"></context:component-scan>
</beans>

8.3springmvc.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:p="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd
                           http://www.springframework.org/schema/util
                           http://www.springframework.org/schema/util/spring-util-4.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
                           http://www.springframework.org/schema/tx
                           http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
                           http://www.springframework.org/schema/aop
                           http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
                           ">
    <!--掃描Controller所在包,但是註意包下的類必須有@Controller或者@RestController-->
    <context:component-scan base-package="com.einmeer.controller"></context:component-scan>
</beans>

8.4web.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">

    <!--配置DispacheServlet,核心攔截器-->
    <servlet>
        <servlet-name>springmvc</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:springmvc.xml</param-value>
        </init-param>
    </servlet>
    <servlet-mapping>
        <servlet-name>springmvc</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

    <!--為監聽器配置參數,目的是為了告訴監聽器,要讀的文件在哪-->
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationcontext.xml</param-value>
    </context-param>
    <!--配置監聽器讀applicationcontext.xml-->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

</web-app>

9.測試

image

9.1Business.java

package com.einmeer.entity;


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

import java.math.BigDecimal;

/**
 * @author 芊嵛
 * @date 2024/3/4
 */
@Data   // get/set方法
@AllArgsConstructor // 有參(全參)
@NoArgsConstructor  // 無參
public class Business {
    private Integer businessId;
    private String businessName;
    private String businessAddress;
    private String businessExplain;
    private String businessImg;
    private Integer orderTypeId;
    private BigDecimal startPrice;
    private BigDecimal deliveryPrice;
    private String remarks;

}

9.2BusinessMapper.java

package com.einmeer.mapper;

import com.einmeer.entity.Business;

import java.util.List;

/**
 * @author 芊嵛
 * @date 2024/3/4
 */
public interface BusinessMapper {
    // 查詢所有信息
    List<Business> list();
}

9.3BusinessMapper.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">

<!-- 全路徑 -->
<mapper namespace="com.einmeer.mapper.BusinessMapper">
    <!--id代表上面Business介面中的方法名字,必須完全一致;後面的是返回值類型,由於MyConfig文件中配置了因此不用寫全路徑,寫名字就行,不如就得向上面那樣從com開始-->
    <select id="list" resultType="Business">
        select businessId,
        businessName,
        businessAddress,
        businessExplain,
        businessImg,
        orderTypeId,
        startPrice,
        deliveryPrice,
        remarks
        from business;
    </select>
</mapper>

9.4BusinessController

package com.einmeer.controller;

import com.einmeer.entity.Business;
import com.einmeer.mapper.BusinessMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 芊嵛
 * @date 2024/3/4
 */
//返回字元串
@RestController
// 多一層路徑
@RequestMapping("/business")
public class BusinessController {
    // 自動new,只限一次
    @Resource
    BusinessMapper businessMapper;

    //    調用方法的路徑
    @GetMapping("/list")
    String list() {
        System.out.println(businessMapper.list());
        return "index";
    }
}

image

10.輸出到頁面上

截至目前能列印到控制台,要想出入到頁面上需要繼續配置

導入jar,轉換成JSON字元串

<!--fastjson-->
<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>2.0.32</version>
</dependency>

springmvc.xml配置消息轉換器與跨域

<!--配置消息轉換器-->
<mvc:annotation-driven>
    <mvc:message-converters>
        <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
            <property name="supportedMediaTypes">
                <value>application/json;charset-utf-8</value>
            </property>
        </bean>
    </mvc:message-converters>
</mvc:annotation-driven>

<!--配置跨域-->
<mvc:cors>
    <mvc:mapping path="/**" allowed-origins="*"/>
</mvc:cors>

BusinessController.java修改一下

package com.einmeer.controller;

import com.einmeer.entity.Business;
import com.einmeer.mapper.BusinessMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 芊嵛
 * @date 2024/3/4
 */
//返回字元串
@RestController
// 多一層路徑
@RequestMapping("/business")
public class BusinessController {
    // 自動new,只限一次
    @Resource
    BusinessMapper businessMapper;

    //    調用方法的路徑
    @GetMapping("/list")
    List<Business> list() {
        return businessMapper.list();
    }
}

image

11.把sql語句輸出到控制視窗

導包

<!--輸出sql到控制視窗-->
<dependency>
    <groupId>org.duracloud</groupId>
    <artifactId>common</artifactId>
    <version>7.0.0</version>
</dependency>

12.一次性插入多條數據

<!--添加-->
<!--collection如果是數組array,要是集合list item自定義 以,分割-->
<insert id="businessAdd" parameterType="Business">
    INSERT INTO business ( businessName, businessAddress, businessExplain, businessImg, orderTypeId, startPrice,
    deliveryPrice, remarks )
    VALUES
    <foreach collection="list" item="abusiness" separator=",">
        (#{abusiness.businessName},
        #{abusiness.businessAddress},
        #{abusiness.businessExplain},
        #{abusiness.businessImg},
        #{abusiness.orderTypeId},
        #{abusiness.startPrice},
        #{abusiness.deliveryPrice},
        #{abusiness.remarks}
        )
    </foreach>;
</insert>

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • react-native工程打包成apk 1. 生成簽名密鑰 使用jdk自帶的keytool生成密鑰 以管理員身份運行如下命令 keytool -genkey -v -keystore my-test3-key.keystore -alias my-key-test3 -keyalg RSA -ke ...
  • 使用XML文件配置SSM整合。 缺點:xml解析低,降低項目響應效率。 配置web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="ht ...
  • 訂單履約系統的概念模型 訂單:客戶提交購物請求後,生成的買賣合同,通常包含客戶信息、下單日期、所購買的商品或服務明細、價格、數量、收貨地址以及支付方式等詳細信息。 子訂單:為了更高效地進行履約,大訂單可能會被拆分成多個子訂單,子訂單會根據商品類型、配送地址、倉庫位置或供應商等因素進行拆分。 發貨單: ...
  • SSM整合就是將MVC三層架構和框架核心API組件交給SpringIoC容器管理! 一般需要配置兩個IoC容器進行三層架構組件管理。 容器名 盛放組件 web容器 web相關組件(controller,springmvc核心組件) root容器 業務和持久層相關組件(service,aop,tx,d ...
  • 代理模式(Proxy Design Pattern)在不改變原始類(或叫被代理類)代碼的情況下,通過引入代理類來給原始類附加功能。通過GPT來一探原理。 ...
  • 前言: 編程語言本身沒有優劣之分,不同的語言適合不同的場景,文中說的建議,多是站在小白要就業的立場給出的建議。 正文 我們看這張導圖,這張圖右側是前端類的語言,左側是服務端的語言: 我們先說右側。 第一個就是 JavaScript,簡稱 JS。 我強調下他和 Java 是沒有關係的,只是名字類似。 ...
  • 工業網關是一種用於連接工業設備和網路的關鍵設備,它能夠將不同協議、不同傳輸速率的工業設備連接到網路上,實現數據的傳輸和共用。不同類型的工業網關之間存在一些區別,以下是一些常見的工業網關類型及其區別: ...
  • 1. 有人說 Python 性能沒那麼 Low? 這個我用 pypy 2.7 確認了下,確實沒那麼差, 如果用 NumPy 或其他版本 Python 的話,性能更快。但 pypy 還不完善,pypy3 在 beta, 所以一般情況,我是說一般情況下,這點比較讓人不爽。 2. 有人說怎麼沒有 C#、R ...
一周排行
    -Advertisement-
    Play Games
  • 示例項目結構 在 Visual Studio 中創建一個 WinForms 應用程式後,項目結構如下所示: MyWinFormsApp/ │ ├───Properties/ │ └───Settings.settings │ ├───bin/ │ ├───Debug/ │ └───Release/ ...
  • [STAThread] 特性用於需要與 COM 組件交互的應用程式,尤其是依賴單線程模型(如 Windows Forms 應用程式)的組件。在 STA 模式下,線程擁有自己的消息迴圈,這對於處理用戶界面和某些 COM 組件是必要的。 [STAThread] static void Main(stri ...
  • 在WinForm中使用全局異常捕獲處理 在WinForm應用程式中,全局異常捕獲是確保程式穩定性的關鍵。通過在Program類的Main方法中設置全局異常處理,可以有效地捕獲並處理未預見的異常,從而避免程式崩潰。 註冊全局異常事件 [STAThread] static void Main() { / ...
  • 前言 給大家推薦一款開源的 Winform 控制項庫,可以幫助我們開發更加美觀、漂亮的 WinForm 界面。 項目介紹 SunnyUI.NET 是一個基於 .NET Framework 4.0+、.NET 6、.NET 7 和 .NET 8 的 WinForm 開源控制項庫,同時也提供了工具類庫、擴展 ...
  • 說明 該文章是屬於OverallAuth2.0系列文章,每周更新一篇該系列文章(從0到1完成系統開發)。 該系統文章,我會儘量說的非常詳細,做到不管新手、老手都能看懂。 說明:OverallAuth2.0 是一個簡單、易懂、功能強大的許可權+可視化流程管理系統。 有興趣的朋友,請關註我吧(*^▽^*) ...
  • 一、下載安裝 1.下載git 必須先下載並安裝git,再TortoiseGit下載安裝 git安裝參考教程:https://blog.csdn.net/mukes/article/details/115693833 2.TortoiseGit下載與安裝 TortoiseGit,Git客戶端,32/6 ...
  • 前言 在項目開發過程中,理解數據結構和演算法如同掌握蓋房子的秘訣。演算法不僅能幫助我們編寫高效、優質的代碼,還能解決項目中遇到的各種難題。 給大家推薦一個支持C#的開源免費、新手友好的數據結構與演算法入門教程:Hello演算法。 項目介紹 《Hello Algo》是一本開源免費、新手友好的數據結構與演算法入門 ...
  • 1.生成單個Proto.bat內容 @rem Copyright 2016, Google Inc. @rem All rights reserved. @rem @rem Redistribution and use in source and binary forms, with or with ...
  • 一:背景 1. 講故事 前段時間有位朋友找到我,說他的窗體程式在客戶這邊出現了卡死,讓我幫忙看下怎麼回事?dump也生成了,既然有dump了那就上 windbg 分析吧。 二:WinDbg 分析 1. 為什麼會卡死 窗體程式的卡死,入口門檻很低,後續往下分析就不一定了,不管怎麼說先用 !clrsta ...
  • 前言 人工智慧時代,人臉識別技術已成為安全驗證、身份識別和用戶交互的關鍵工具。 給大家推薦一款.NET 開源提供了強大的人臉識別 API,工具不僅易於集成,還具備高效處理能力。 本文將介紹一款如何利用這些API,為我們的項目添加智能識別的亮點。 項目介紹 GitHub 上擁有 1.2k 星標的 C# ...