无配置文件整合SSM框架

1、纯java无配置搭建SSM项目 1、创建javassm的maven项目 创建一个普通的Maven工程(不用加任何脚手架或者web), 2、添加依赖 阅读详情

目录

1.所需Maven依赖与插件:

2.概念:

3.SpringMvc与mybatis整合所需配置类


1.所需Maven依赖与插件:

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <spring.version>5.2.2.RELEASE</spring.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis-spring</artifactId>
      <version>2.0.3</version>
    </dependency>
    <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.5.1</version>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>commons-fileupload</groupId>
      <artifactId>commons-fileupload</artifactId>
      <version>1.2.2</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>1.4</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.11.1</version>
    </dependency>
    <dependency>
      <groupId>com.github.pagehelper</groupId>
      <artifactId>pagehelper</artifactId>
      <version>5.2.0</version>
    </dependency>
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.16</version>
    </dependency>
    <dependency>
      <groupId>jstl</groupId>
      <artifactId>jstl</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>taglibs</groupId>
      <artifactId>standard</artifactId>
      <version>1.1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>4.0.1</version>
    </dependency>
  </dependencies>

  <build>
    <finalName>ch01</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>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/**.xml</include>
        </includes>
      </resource>
    </resources>
  </build>

2.概念:

无配置文件整合ssm,本质上是将配置文件替换成了配置类

3.SpringMvc与mybatis整合所需配置类

@Configuration :使用该注释配置类后,包含定义和配置Spring Bean类的方法

@ComponentScan:扫描注解

@EnableWebMvc: 启用Spring MVC(Model-View-Controller)框架的功能和配置

SpringConfig配置类:

@Configuration
@EnableWebMvc  //启用Spring MVC(Model-View-Controller)框架的功能和配置
@ComponentScan(basePackages = "com.bdqn.ssm.controller")
public class SpringMvcConfig implements WebMvcConfigurer {
    //视图映射器
    @Bean
    public InternalResourceViewResolver viewResolver() {
        InternalResourceViewResolver resolver = new InternalResourceViewResolver();
        resolver.setPrefix("/WEB-INF/jsp/");
        resolver.setSuffix(".jsp");
        return resolver;
    }
	//处理文件上传
    @Bean
    public CommonsMultipartResolver multipartResolver() {
        CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
        return multipartResolver;
    }

    //资源处理器,以处理静态资源
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/js/**").addResourceLocations("/js/");
        // addResourceHandler(路径): 任何以这个路径开头的url都会被资源处理器处理(捕获)
        //addResourceLocations(路径):静态资源文件在服务器文件系统上的物理位置
    }

    //拦截器
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //创建一个拦截器接口的实现,并将其添加到拦截器注册中
        registry.addInterceptor(new HandlerInterceptor() {
            //随后重写preHandle方法,该方法用于在实际请求处理之前执行的逻辑
            @Override
            public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
                System.out.println("request.getRequestURI() = " + request.getRequestURI());
                return true;
            }
        }).addPathPatterns("/**");  //拦截所有请求
    }
}

SpringMvc配置类:

@Configuration
@ComponentScan(basePackages = "com.bdqn.ssm.service")  //自动扫描注解
public class SpringConfig {
    //数据源
    @Bean
    public DataSource dataSource(){
        BasicDataSource dataSource = new BasicDataSource();
        dataSource.setUsername("root");
        dataSource.setPassword("123456");
        dataSource.setUrl("jdbc:mysql:///cvs_db?serverTimezone=Asia/Shanghai");
        dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver");
        return dataSource;
    }
    //配置和创建MyBatis的实例的工厂bean
    @Bean
    public SqlSessionFactoryBean sqlSessionFactoryBean(){
        SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
        sqlSessionFactoryBean.setDataSource(dataSource());
        return sqlSessionFactoryBean;
    }
    //自动装配
    @Bean
    public MapperScannerConfigurer mapperScannerConfigurer(){
        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
        mapperScannerConfigurer.setBasePackage("com.QianMo.ssm.mapper");
        return mapperScannerConfigurer;
    }
}

Web配置类:

public class WebConfig  implements WebApplicationInitializer {
    @Override
    public void onStartup(ServletContext servletContext) throws ServletException {
        //基于java配置的实现,在方法内部,可配置Servlet
        AnnotationConfigWebApplicationContext ctx = new AnnotationConfigWebApplicationContext();
        //注册两个配置类
        ctx.register(SpringMvcConfig.class, SpringConfig.class);
        //
        ctx.setServletContext(servletContext);
        //在Servlet容器中添加一个名为soring-mvc的Servlet,它负责处理所有的HTTP请求并将它们分发到相应的处理器(Controller)
        ServletRegistration.Dynamic dynamic = servletContext.addServlet("spring-mvc", new DispatcherServlet(ctx));
        //设置加载顺序
        dynamic.setLoadOnStartup(0);
        //表示该Servlet拦截所有请求
        dynamic.addMapping("/");
    }
}
SSM框架Spring整合myBatis配置文件信息 SSM框架Spring整合myBatis配置文件信息 jdbc.properties.xml jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.url=jdbc:mysql://localhost:3306/o2o?useUnicod=true&characterEncoding=utf8 jdbc.username=root jdbc.password=123456 myBatis-config.xml <?xml version="1.0" 阅读详情

相关推荐

SSM框架整合配置文件详解与实战应用

SSM框架是指Spring、SpringMVC与MyBatis三者的整合,构成了Java Web开发中经典的三层架构基础。其中,Spring负责业务层管理与IoC容器控制,实现解耦和依赖注入;SpringMVC作为表现层框架,处理HTTP请求与响应;而MyBatis作为持久层ORM框架,简化数据库交互操作。通过整合三者,可实现清晰的职责划分与高效的协作机制。

weixin_35696112的博客 790

如何搭建一个基于Java Config零配置的SSM框架(无配置文件)

基于Java形式的项目配置,相比于基于配置文件的形式更直接,更简洁,更简单。使用配置文件,比如xml,json,properties等形式,都是用代码去解析配置文件内的信息,然后根据其信息设置相应配置类的属性。而Java形式的配置是跳过配置文件,直接将配置信息赋值到相应的配置类里。 以文件形式配置,一般相应的解析类和配置类都不容易找到,感觉这里面是一个黑箱,只知道应该这样配置,但是不清楚为什么这

点滴之积 2986

SSM框架必需的三个配置文件

web.xml db.properties applicationContext.xml三个配置文件

基于javaConfig的无配置文件的SSM项目整合

基于javaConfig的无配置文件的SSM项目整合 文章目录基于javaConfig的无配置文件的SSM项目整合pom.xmlAppConfig.java (spring)WebmvcConfig.java (springmvc)RootConfig.java (WEB)Main (启动)AOP 通知AOP 切面方式配置事务JSR 303 验证异常解析器全局异常解析器 pom.xml pom....

孔明的博客 470

Maven + spring + mybatis + mysql + 事务管理

maven spring mybatis mysql 事务管理 企业级开发

Cadence ADE实战:1GHz VCO相位噪声仿真全流程(附PSS/Pnoise避坑指南)

本文详细介绍了在Cadence ADE环境中对1GHz VCO进行相位噪声仿真的完整流程。重点剖析了PSS(周期性稳态分析)和Pnoise(周期性噪声分析)两大核心引擎的关键参数设置与避坑指南,帮助射频与模拟IC设计者准确评估VCO性能,解决仿真不收敛、结果异常等常见问题。

rock5的博客 688

mybatis与spring集成

文章目录添加相关依赖创建spring配置文件applicationContextapplicationContext:applicationContext-mybatis.xml:generatorConfig.xml:jdbc.properties:log4j2.xml:mybatis.cfg.xml:注解式开发测试代码:mapper包BookMapperBookMapper.xml:servi...

weixin_43977846的博客 813

Python实战:如何用高德API批量获取POI数据(附完整代码)

本文详细介绍了如何使用Python通过高德API批量获取POI数据,包括API基础准备、核心功能模块设计、高级功能实现及实战应用案例。文章提供了完整代码示例,帮助开发者高效解决商业网点分析、公共设施规划等实际项目中的数据采集需求。

stem5的博客 353

Maven+Mybatis+Spring配置之第一步:配置pom.xml依赖

博客分类:  Spring SpringmavenXMLlog4jJava  1.配置slfj+logback:  Java代码                             org.slf4j               slf4j-api               ${org.slf4j.version}           

ccecwg的专栏 2845

Docker小白也能搞定!5分钟用calibre-web搭建私人Kindle书库(附静读天下配置)

本文为零基础用户提供了一份详尽的指南,介绍如何利用Docker容器技术,在5分钟内快速部署Calibre-Web服务,从而搭建一个完全私有的个人Kindle书库。教程涵盖了从Docker安装、Calibre-Web一键部署、书籍元数据管理到移动端配置的全流程,并重点讲解了如何与安卓端知名阅读应用“静读天下”联动,实现跨设备无缝访问,打造媲美在线书城的个性化阅读体验。

weixin_29216957的博客 549

保姆级教程:在SIwave 2024 R2中搞定TDR仿真,手把手教你分析USB 3.0差分线阻抗

本文提供了一份详细的SIwave 2024 R2 TDR仿真教程,重点讲解如何分析USB 3.0差分线阻抗。从项目准备、参数配置到结果分析,逐步指导工程师完成完整的仿真流程,并分享实战经验和高级技巧,帮助提升信号完整性分析能力。

weixin_33670786的博客 507

框架整合——SSM基于配置文件的整合

Spring、SpringMVC、MyBatis三个轻量级框架各自具有不同的功能。提供了 IoC(控制反转)和 AOP(面向切面编程)功能,帮助管理对象的生命周期和依赖关系。采用 MVC(模型-视图-控制器)设计模式,将请求处理、业务逻辑和视图渲染分离。它可以处理 HTTP 请求,支持 RESTful 风格的接口,适合构建 Web 应用。简化了数据库操作,使用 XML 或注解方式定义 SQL 语句,与 Java 对象进行映射。

hsfd_的博客 1029

jenkins连接外部k8s集群

k8s连接集群外Jenkins

liuchao666888的博客 1533

SSM框架的整合的配置文件

SSM框架的整合一、环境的准备二、spring整合mybatis 的配置文件三、springmvc配置文件四、web文件的的配置 一、环境的准备 三大框架整合所需要的jar 二、spring整合mybatis 的配置文件 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframewor...

qq_43331747的博客 455

【网络安全】SSRF漏洞讲解

SSRF漏洞讲解一、初识SSRF漏洞1.定义2.产生原理3.会导致的危害4.常见产生SSRF的地方5.常见缺失函数二、SSRF漏洞利用1.函数(1) file_get_contents(2)fsockopen()(3) curl_exec()2.协议(1)file协议(2)http协议(3)dict协议(4)gopher协议三、绕过1.绕过方式(1)检查IP是否为内网IP(2)Host获取与DNS绕过(3)通过各种协议(4)利用URL解析器滥用问题四、修复修复方案五、小结 一、初识SSRF漏洞 1.定义

你在看屏幕的同时,屏幕也在注视着你 3190

CANbus收发器TJA1051T/3/1J应用原理图设计

该收发器是为汽车工业中的高速CAN应用而设计的,为(一个带有)CAN协议控制器的微控制器)提供差分传输和接收能力。它提供了改进的电磁兼容性(EMC)和静电放电(ESD)性能,还具有:当电源电压关闭时,TJA1051T/3和TJA1051TK/3可以直接与电源电压从3V到5V的微控制器接口。这种实现能够在CAN FD快速阶段以高达5 Mbit/s的数据速率进行可靠的通信。TJA1051T/3和TJA1051TK/3上的VIO输入允许直接连接3 V至5 V微控制器(分别提供SO8和极小的HVSON8封装)

zhusl6688的博客 3629

SSM框架整合:各种配置文件的整合和详解

SSM框架整合:各种配置文件的整合和详解 前言 学习了ssm框架的整合之后,对于数量众多的配置文件,和各种不同的配置方式感到甚是头疼,接下来教给大家一个清晰明白的配置,分门别类的配置不同的xml文件。 项目目录 名称 作用 mapper mybatis映射文件 spring spring家族配置文件=context为父(全局性)+mybatis整合+transaction事务+mvc config druid配置文件 log4j log4j.properties文件 w

weixin_48709775的博客 5830

【Claude Code 源码解析教程】第25章:测试与调试

Claude Code 作为复杂的 AI 编程助手,测试与调试是保证质量的关键环节。项目建立了完善的测试体系,包括单元测试、集成测试、端到端测试等多个层次,同时提供了丰富的调试工具和技巧。

rengang66的博客 222

SSM框架整合的配置文件

1、Spring与Mybatis的配置文件整合&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context=&quot

jinYwuM的博客 421

深度学习工具包 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")

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

SSM框架整合之Spring主配置文件的写法

1.添加相关jar包 2.搭建环境 3.编写applicationContext.xml配置文件(全部采用注解方式开发) <beans xmlns="http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:co

shemuel的技术笔记 603

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

整合ssm框架的配置文件

整合ssm框架的配置文件 方便快捷的开发,复制修改相应的文件名即可使用 spring配置文件,springmvc配置文件,mybatis配置文件 1.applicationContext.xml(spring配置文件) <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/200

weixin_45922059的博客 218

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

SSM 三大框架中的各种配置文件以及ssm整合

SSM 三大框架中的各种配置文件以及必要文件的模板 第一个框架mybatis的配置文件 默认名:mybatis-config.xml 放在\src\main\resources 路径下 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis

JJ_only_love_SS的博客 523

每日学习:SSM框架整合需要的配置文件

SSM框架整合 SSM整合可以使用多种方式,我们选择XML + 注解的方式 整合思路是什么? 1.先搭建整合的环境 (简单省略,就是一个maven 项目) 2.先把Spring的配置搭建完成 3.再使用Spring整合SpringMVC框架 4.最后使用Spring整合MyBatis框架 搭建整合的环境 详细操作请见: 把Spring的配置搭建完成 需要的配置文件: pom.xml 功能强大。该文件用于管理:源代码、配置文件、开发者的信息和角色、问题追踪系统、组织信息、项目授权、项目的url、项目

华山栈道的博客 444

SSM框架整合配置文件方式笔记

SSM框架整合配置文件方式笔记 文章目录SSM框架整合配置文件方式笔记一、整合所需依赖二、SSM的整合(配置文件方式)Controller层配置文件Service层配置文件Dao层配置文件web.xml三、重要的类以及属性Dao层Service层Controller层四、MybatisMapper的使用五、MybatisMapper通用代码生成器的使用 一、整合所需依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http:

AC_sunK的博客 206

SSM框架整合(配置文件)

文章目录一、项目结构图二、导入jar包依赖(pom.xml)三、mybtis配置(mybatis-config.xml)四、数据库信息(debase.properties)五、spring配置(applicationContext.xml、spring-dao.xml、spring-service.xml、spring-mvc.xml)六、web配置(web.xml) 一、项目结构图 二、导入jar包依赖(pom.xml) Junit,数据库驱动,数据库连接池,Servlet JSP,Mybatis

高朗的博客 478

SSM框架整合配置文件

SSM框架整合的各个基本配置文件的模板,学习狂神SSM视频总结的配置笔记,方便以后SSM项目的搭建复用。

weixin_43806049的博客 566
上一篇: SpringBoot入门
下一篇: SpringBoot开发Web应用
java-阡陌
博客等级 码龄4年 203粉丝 19原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值