SSM整合,非常详细的SSM整合[通俗易懂]

SSM整合,非常详细的SSM整合[通俗易懂]对于ssm框架网上有很多,这里只是自己为大家提供的一个ssm整合框架参考分享,这个前提是基于maven的管理工具写的,如果觉得写得不好,博主这边已经把代码上传了:不妨可以参考代码再理解学习:https://download.csdn.net/download/qq_30764991/11012764如果觉得文章不错,对你有帮助,请作者喝杯咖啡,谢谢!如果对您有帮助,请多多支持.多少都…

大家好,又见面了,我是你们的朋友全栈君。

对于ssm框架网上有很多,这里只是自己为大家提供的一个ssm整合框架参考分享,这个前提是基于maven的管理工具写的,

如果觉得写得不好,博主这边已经把代码上传了:

不妨可以参考代码再理解学习:https://download.csdn.net/download/qq_30764991/11012764

如果觉得文章不错,对你有帮助,请作者喝杯咖啡,谢谢!如果对您有帮助 ,请多多支持.多少都是您的心意与支持,一分也是爱,再次感谢!!!打开支付宝首页搜“556723462”领红包,领到大红包的小伙伴赶紧使用哦!感谢大家的支持!您的支持,我会继续分享更多的文章,欢迎关注!

SSM整合,非常详细的SSM整合[通俗易懂]
一 创建Maven项目具体步骤如下:

二 配置文件

2.1 配置mybatis-config.xml

2.2 配置mapper.xml

2.3 配置jdbc.properties

2.4 配置applicationContext.xml

2.5 配置springmvc-servlet.xml

2.6 配置web.xml

2.7 配置log4j.properties

2.8 引入依赖

三 测试

3.1 创建java文件

3.1.1 UserController类

3.1.2 User实体类

3.1.3 UserService接口 

3.1.4 UserServiceImpl实现类

3.1.5 UserMapper类

3.2 创建MySql数据库表

3.3 创建users.jsp文件

3.4 结果

==============================================================================

1.设计数据库表如下:

/*
Date: 2019-03-11 23:19:10
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for tb_user
-- ----------------------------
DROP TABLE IF EXISTS `tb_user`;
CREATE TABLE `tb_user` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(100) DEFAULT NULL COMMENT '用户名',
  `password` varchar(100) DEFAULT NULL COMMENT '密码',
  `name` varchar(100) DEFAULT NULL COMMENT '姓名',
  `age` int(10) DEFAULT NULL COMMENT '年龄',
  `sex` tinyint(1) DEFAULT NULL COMMENT '性别,1男性,2女性',
  `birthday` date DEFAULT NULL COMMENT '出生日期',
  `created` datetime DEFAULT NULL COMMENT '创建时间',
  `updated` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`user_name`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8;

INSERT INTO `tb_user` VALUES (1, 'zhangsan', '123456', '张三', 30, 1, '1984-8-8', '2014-9-19 16:56:04', '2014-9-21 11:24:59');
INSERT INTO `tb_user` VALUES (2, 'lisi', '123456', '李四', 21, 2, '1991-1-1', '2014-9-19 16:56:04', '2014-9-19 16:56:04');
INSERT INTO `tb_user` VALUES (3, 'wangwu', '123456', '王五', 22, 2, '1989-1-1', '2014-9-19 16:56:04', '2014-9-19 16:56:04');
INSERT INTO `tb_user` VALUES (4, 'zhangwei', '123456', '张伟', 20, 1, '1988-9-1', '2014-9-19 16:56:04', '2014-9-19 16:56:04');
INSERT INTO `tb_user` VALUES (5, 'lina', '123456', '李娜', 28, 1, '1985-1-1', '2014-9-19 16:56:04', '2014-9-19 16:56:04');
INSERT INTO `tb_user` VALUES (6, 'lilei', '123456', '李磊', 23, 1, '1988-8-8', '2014-9-20 11:41:15', '2014-9-20 11:41:15');
INSERT INTO `tb_user` VALUES (8, 'xiaofeng', '123456', '萧峰', 30, 1, '2018-6-25', '2018-6-25 18:42:25', '2018-6-25 18:42:25');
INSERT INTO `tb_user` VALUES (12, 'zhendeshuai', '565656', '吴彦祖', 26, 1, '2018-6-26', '2018-6-26 14:55:59', '2018-6-26 15:12:12');
INSERT INTO `tb_user` VALUES (14, 'jiumozhi', '123456', '鸠摩智', 30, 1, '2018-6-26', '2018-6-26 23:53:15', '2018-6-26 23:53:15');
INSERT INTO `tb_user` VALUES (21, 'zhangsan1234', '12345', '杰克', 20, 1, '2000-1-1', '2018-7-7 21:50:26', '2018-7-7 21:50:26');
INSERT INTO `tb_user` VALUES (22, 'zhangsanqwe1', '123455', '张三', 30, 1, '1999-2-25', '2018-7-7 21:51:20', '2018-7-7 21:51:20');
INSERT INTO `tb_user` VALUES (25, 'qianjiu', '123456', '钱九', 30, 1, '1989-1-1', '2018-7-7 21:51:20', '2018-7-7 21:51:20');
INSERT INTO `tb_user` VALUES (26, 'zhaoniu', '123456', '赵牛', 28, 1, '1989-1-1', '2018-7-7 21:51:20', '2018-7-7 21:51:20');

 

2 创建一个ssmDemo项目(项目名称可以自定义),如图所示:

SSM整合,非常详细的SSM整合[通俗易懂]

创建好之后如下图所示:

SSM整合,非常详细的SSM整合[通俗易懂]

 

项目会报错,不用急,为什么呢?因为这是一个不完整的maven项目,缺少web.xml。

右键点击项目,如下操作,会自动补全web.xml文件

SSM整合,非常详细的SSM整合[通俗易懂]

3,向ssmzh项目中的pom.xml导入spring-springmvc-mybatis整合所需要的依赖,具体依赖如下:

<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.agu</groupId>
    <artifactId>SSMDemo</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>


    <dependencies>
        <!--spring-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.3.13.RELEASE</version>
        </dependency>
        <!--配置webmvc-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.3.13.RELEASE</version>
        </dependency>
        <!--配置spring jdbc,用来加载DataSourceTransactionManager-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.3.13.RELEASE</version>
        </dependency>
        <!--配置切面的jar包-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>4.3.13.RELEASE</version>
        </dependency>
        <!--mybatis,用来加载SqlSessionFactoryBean和MapperScannerConfigurer-->
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.2.8</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.2.2</version>
        </dependency>
        <!--数据库驱动包-->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.32</version>
        </dependency>
        <!--日志文件-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.22</version>
        </dependency>

        <!--json处理工具包-->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.0</version>
        </dependency>
        <!-- 连接池,用来加载DruidDataSource-->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.9</version>
        </dependency>
        <!--javaScript标签库-->
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- 配置Tomcat插件 -->
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <configuration>
                    <port>8080</port>
                    <path>/</path>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

4,配置spring.xml(企业常用applicationContext.xml命名表示是spring的配置,我这里命名为spring.xml)

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:context=”http://www.springframework.org/schema/context” xmlns:p=”http://www.springframework.org/schema/p”
xmlns:aop=”http://www.springframework.org/schema/aop” xmlns:tx=”http://www.springframework.org/schema/tx”
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-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/aop http://www.springframework.org/schema/aop/spring-aop-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/util http://www.springframework.org/schema/util/spring-util-4.0.xsd”>

<!–开启spring注解,扫描spring注解所在的包 –>
<context:component-scan base-package=”com.usermanage”/>

<!– 加载资源文件 –>
<bean class=”org.springframework.beans.factory.config.PropertyPlaceholderConfigurer”>
<!– 配置资源文件 –>
<property name=”locations”>
<list>
<value>classpath:jdbc.properties</value>
</list>
</property>
</bean>
<!–spring 配置连接池,数据源 –>
<bean id=”dataSource” class=”com.mchange.v2.c3p0.ComboPooledDataSource”
destroy-method=”close”>
<property name=”driverClass” value=”${driver}”></property>
<property name=”jdbcUrl” value=”${url}”></property>
<property name=”user” value=”${user}”></property>
<property name=”password” value=”${passwd}”></property>
</bean>

</beans>

5,spring-tx(spring事务的配置)如下:

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:context=”http://www.springframework.org/schema/context” xmlns:p=”http://www.springframework.org/schema/p”
xmlns:aop=”http://www.springframework.org/schema/aop” xmlns:tx=”http://www.springframework.org/schema/tx”
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-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/aop http://www.springframework.org/schema/aop/spring-aop-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/util http://www.springframework.org/schema/util/spring-util-4.0.xsd”>

<!– 定义事务管理器 –>
<bean id=”transactionManager”
class=”org.springframework.jdbc.datasource.DataSourceTransactionManager”>
<property name=”dataSource” ref=”dataSource” />
</bean>

<!– 定义事务策略 –>
<tx:advice id=”txAdvice” transaction-manager=”transactionManager”>
<tx:attributes>
<!–所有以query开头的方法都是只读的 –>
<tx:method name=”query*” read-only=”true” />
<tx:method name=”get*” read-only=”true” />
<tx:method name=”find*” read-only=”true” />
<tx:method name=”select*” read-only=”true” />
<!–其他方法使用默认事务策略 –>
<tx:method name=”*” />
</tx:attributes>
</tx:advice>

<aop:config>
<!–pointcut元素定义一个切入点,execution中的第一个星号 用以匹配方法的返回类型,
这里星号表明匹配所有返回类型。 com.abc.dao.*.*(..)表明匹配cn.itcast.mybatis.service包下的所有类的所有 
方法 –>
<aop:pointcut id=”myPointcut” expression=”execution(* com.usermanage.service.*.*(..))” />
<!–将定义好的事务处理策略应用到上述的切入点 –>
<aop:advisor advice-ref=”txAdvice” pointcut-ref=”myPointcut” />
</aop:config>
 

</beans>

6,spring-mybatis.xml整合配置如下:

<?xml version=”1.0″ encoding=”UTF-8″?>
<beans xmlns=”http://www.springframework.org/schema/beans”
xmlns:context=”http://www.springframework.org/schema/context” xmlns:p=”http://www.springframework.org/schema/p”
xmlns:aop=”http://www.springframework.org/schema/aop” xmlns:tx=”http://www.springframework.org/schema/tx”
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-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/aop http://www.springframework.org/schema/aop/spring-aop-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/util http://www.springframework.org/schema/util/spring-util-4.0.xsd”>
<!– spring整合Mybatis的配置,其实主要是mybatis的相应配置 –>
<!– 
sqlSession工厂 mapper的接口配置
–>
<bean id=”sqlSessionFactory” class=”org.mybatis.spring.SqlSessionFactoryBean”>
<property name=”dataSource” ref=”dataSource” />
<!– 加载全局的配置文件 –>
<property name=”configLocation” value=”classpath:mybatis/mybatis-config.xml”></property>
<!– 配置mapper的扫描,找到所有的mapper.xml映射文件。编码时放开注释,如果放开需要在mapper中写一个mapper也是可以的 –>
<!– <property name=”mapperLocations” value=”classpath:mybatis/mapper/*.xml”></property> –>
<!– 配置类型别名 –>
<property name=”typeAliasesPackage” value=”com.usermanage.pojo”></property>
</bean>

<bean class=”org.mybatis.spring.mapper.MapperScannerConfigurer”>
  <!–配置mapper接口所在路径,扫描路径下的所有的mapper接口  如果配置多个mapper的包,使用逗号进行分割
   –>
   <!–在mybatis当中,dao层与mapper是一样的,只是不同地方叫法不一样,mapper.xml是写sql的,是用来操作数据库的  –>
  <property name=”basePackage” value=”cn.usermanage.dao,cn.usermanage.mapper” />
</bean>

</beans>

7,springmvc.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: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/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd”>

<!– 配置推荐使用注解驱动,会默认的加载上面的两个 HandlerMapping, HandlerAdapter –>
<mvc:annotation-driven />
<!– 开启springmvc注解扫描 –>
<context:component-scan base-package=”cn.usermanage.controller”></context:component-scan>
<!– 这个是excelView的加载,原生态ssm不需要,所以这里是可以省略的 –>
<!– <bean name=”excelView” class=”cn.usermanage.view.UserExcelView”></bean> –>

<!– 视图解析器 –>
<bean
class=”org.springframework.web.servlet.view.InternalResourceViewResolver”>
<!– 前缀,这里是请求的路径文件 –>
<property name=”prefix” value=”/WEB-INF/views/”></property>
<!– 后缀 ,支持.jsp的请求–>
<property name=”suffix” value=”.jsp”></property>
</bean>
<!– 以上是原生态的ssm配置 –>

<!– 配置第二个视图解析器 –>
<!– <bean class=”org.springframework.web.servlet.view.BeanNameViewResolver”>
<property name=”order” value=”1″></property>
</bean> –>

<!– 定义文件上传解析器 –>
<!– <bean id=”multipartResolver”
class=”org.springframework.web.multipart.commons.CommonsMultipartResolver”>
设定默认编码
<property name=”defaultEncoding” value=”UTF-8″></property>
设定文件上传的最大值5MB,5*1024*1024
<property name=”maxUploadSize” value=”5242880″></property>
</bean> –>

<!– 解决静态资源被拦截的问题 –>
<!– <mvc:default-servlet-handler/> –>

</beans>

8,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>
  <settings>
  <!– 开启驼峰匹配 –>
<setting name=”mapUnderscoreToCamelCase” value=”true”/>
  </settings>
  <!– 分页助手 –>
  <plugins>
    <!– com.github.pagehelper为PageHelper类所在包名 –>
    <plugin interceptor=”com.github.pagehelper.PageHelper”>
    <!– 数据库方言 –>
        <property name=”dialect” value=”mysql”/>
        <!– 设置为true时,使用RowBounds分页会进行count查询 会去查询出总数 –>
        <property name=”rowBoundsWithCount” value=”true”/>
    </plugin>
</plugins>

 </configuration>

9,Mybatis-generator的配置(这个需要请先安装mybatis-generator插件,然后即可),generatorConfig.xml配置如下:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!DOCTYPE generatorConfiguration PUBLIC “-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN” “http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd” >
<generatorConfiguration >
<!– 数据库jar包驱动路径必须手动加上去 –>
<classPathEntry location=”D:\allworkspace\testspace\mybatis-zidong\src\main\resources\mybatis-generator\mysql-connector-java-5.1.25.jar” />  
<!–数据库名称  –>
  <context id=”test” >
   <!– commentGenerator 去除自动生成的注释 –>  
        <commentGenerator>  
            <property name=”suppressAllComments” value=”true” />  
            <property name=”suppressDate” value=”true” />  
        </commentGenerator> 
  <!– 数据库驱动,连接,用户名,密码 –>
    <jdbcConnection driverClass=”com.mysql.jdbc.Driver” connectionURL=”jdbc:mysql://localhost:3306/test?useUnicode=true&amp;characterEncoding=UTF-8″ userId=”root” password=”123″ />
    <!– pojo实体信息 ,包名称与项目名称–>
    <javaModelGenerator targetPackage=”com.usermanage.pojo” targetProject=”mybatis-zidong/src/main/java” />
    <!–  mapper信息–>
    <sqlMapGenerator targetPackage=”com.usermanage.mapper” targetProject=”mybatis-zidong/src/main/java” />
    <!– dao接口 –>
    <javaClientGenerator targetPackage=”com.usermanage.dao” targetProject=”mybatis-zidong/src/main/java” type=”XMLMAPPER” />
    <!–表名  ,domainObjectName=”Teacher”表示与数据库所对应的实体–>
    <table schema=”teacher” tableName=”teacher” domainObjectName=”Teacher”
    enableCountByExample=”false” enableUpdateByExample=”false” enableDeleteByExample=”false”   
            enableSelectByExample=”false” selectByExampleQueryId=”false”></table>
  </context>
</generatorConfiguration>

10.jdbc.properties配置如下:

driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/mybatis?useUnicode=true&characterEncoding=utf-8
user=root

passwd=123456

11.log4j.properties日志配置如下:

log4j.rootLogger=DEBUG,A1
log4j.logger.org.mybatis=DEBUG
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-d{yyyy-MM-dd HH:mm:ss,SSS} [%t] [%c]-[%p] %m%n

12,配置web.xml,具体如下:

<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://java.sun.com/xml/ns/javaee” xsi:schemaLocation=”http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd” version=”2.5″>
<display-name>ssmzh</display-name>
<!– 加载spring相关配置 –>
<context-param>
<param-name>contextConfigLocation</param-name>
<!– 这里使用的是以spring*.xml的通配符方式加载配置的 –>
<param-value>classpath:spring/spring*.xml</param-value>
</context-param>
<!–Spring的ApplicationContext 载入 –>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<!– 编码过滤器,以UTF8编码 –>
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<!– 配置SpringMVC –>
<servlet>
<servlet-name>usermanage</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<!– 指定加载外部的spring-mvc配置文件 –>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/springmvc.xml</param-value>
</init-param>
<!– 这个可以不配,可以省略 –>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>usermanage</servlet-name>
<!– 拦截所有的请求,除了jsp。  /xx.html js css 会 –>
<url-pattern>/</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

</web-app>

结构图所下:

SSM整合,非常详细的SSM整合[通俗易懂]

启动项目输入:http://www.localhost:8080/SSMDemo/user/list

运行结果如下图:

SSM整合,非常详细的SSM整合[通俗易懂]

 

那么到此:一个完整的spring-springmvc-mybatis的整合框架就搭建好了,也许你觉得很复杂,那么这只是一个框架的开始,这个是必须要会的,不论怎么样,一定要多亲自搭建,一次,两次甚至更多,如果连这个基本框架都觉得难,那么你是否也在想应该放弃了。不管哪个行业都有它的难处,要想获得更高必须比别人付出更多。

最后博主把源代码上传:https://download.csdn.net/download/qq_30764991/11012764

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/130134.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)
blank

相关推荐

  • 用什么软件写html语言,写html代码用什么软件

    用什么软件写html语言,写html代码用什么软件写html代码的软件:1、SublimeText;2、Dreamweaver;3、WebStorm;4、HBuilder;5、Notepad;6、VSCode;7、Vim;8、AptanaStudio;9、IntelliJIDEA。本教程操作环境:windows7系统、HTML5版、DellG3电脑。1、SublimeTextSublimeText是一个跨平台的代码编辑器,同时支持W…

  • ubuntu更新源

    ubuntu更新源1.备份原始源文件source.list打开终端,输入:sudocp/etc/apt/sources.list/etc/apt/sources.list.bak2.修改源文件1.继续输入:

  • Python自动化测试webdriver下载地址「建议收藏」

    Python自动化测试webdriver下载地址「建议收藏」主要浏览器WebDriver地址如下:Chrome:http://chromedriver.storage.proxy.ustclug.org/index.htmlFirefox:https://github.com/mozilla/geckodriver/releases/IE:http://selenium-release.storage.proxy.ustclug.org/index.htm…

  • 海量数据处理思路「建议收藏」

    海量数据处理思路「建议收藏」海量数据处理思路海量数据处理海量数据,不能一次加载到内存中海量数据topK(最大和最小k个数),第k大,第k小的数海量数据判断一个整数是否存在其中海量数据找出不重复的数字找出A,B两个海量url文件中共同的url海量数据topK最大K使用最小堆,最小K使用最大堆,这里以最大K为例海量数据hash分块维护最小堆的K个数据的数据容器堆中数据是topK大的数据,堆顶的数据是第K大数据先将海量数据hash再取模m,分成m个小文件,hash(num)%m,也可以直接取模在

  • 字符串正则匹配leetcode_JAVA 正则表达式

    字符串正则匹配leetcode_JAVA 正则表达式原题链接给你一个字符串 s 和一个字符规律 p,请你来实现一个支持 ‘.’ 和 ‘*’ 的正则表达式匹配。‘.’ 匹配任意单个字符‘*’ 匹配零个或多个前面的那一个元素所谓匹配,是要涵盖 整个 字符串 s的,而不是部分字符串。示例 1:输入:s = “aa” p = “a”输出:false解释:”a” 无法匹配 “aa” 整个字符串。示例 2:输入:s = “aa” p = “a*”输出:true解释:因为 ‘*’ 代表可以匹配零个或多个前面的那一个元素, 在这里前面的元素就是

  • mysql字符串拼接的方法_sql中拼接字符串的方法

    mysql字符串拼接的方法_sql中拼接字符串的方法总是记不住字符串拼接,每次都要百度去搜索,所以在这里记录一下,好方便后续的查找,如有错误和问题可以提出,谢谢。字符串拼接分为几种方式,在这里会一一举例写出:第一种:mysql自带语法CONCAT(string1,string2,…),此处是直接把string1和string2等等的字符串拼接起来(无缝拼接哦)说明:此方法在拼接的时候如果有一个值为NULL,则返回NULL…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号