`
jinnianshilongnian
  • 浏览: 21439064 次
  • 性别: Icon_minigender_1
博客专栏
5c8dac6a-21dc-3466-8abb-057664ab39c7
跟我学spring3
浏览量:2405974
D659df3e-4ad7-3b12-8b9a-1e94abd75ac3
Spring杂谈
浏览量:2998462
43989fe4-8b6b-3109-aaec-379d27dd4090
跟开涛学SpringMVC...
浏览量:5632036
1df97887-a9e1-3328-b6da-091f51f886a1
Servlet3.1规范翻...
浏览量:257741
4f347843-a078-36c1-977f-797c7fc123fc
springmvc杂谈
浏览量:1593444
22722232-95c1-34f2-b8e1-d059493d3d98
hibernate杂谈
浏览量:249059
45b32b6f-7468-3077-be40-00a5853c9a48
跟我学Shiro
浏览量:5848248
Group-logo
跟我学Nginx+Lua开...
浏览量:698360
5041f67a-12b2-30ba-814d-b55f466529d5
亿级流量网站架构核心技术
浏览量:780773
社区版块
存档分类
最新评论

【第四章】 资源 之 4.4 Resource通配符路径 ——跟我学spring3

阅读更多

4.4.1  使用路径通配符加载Resource

       前面介绍的资源路径都是非常简单的一个路径匹配一个资源,Spring还提供了一种更强大的Ant模式通配符匹配,从能一个路径匹配一批资源。

 

       Ant路径通配符支持“?”、“*”、“**”,注意通配符匹配不包括目录分隔符“/”:

 

         “?”:匹配一个字符,如“config?.xml”将匹配“config1.xml”;

         “*”:匹配零个或多个字符串,如“cn/*/config.xml”将匹配“cn/javass/config.xml”,但不匹配匹配“cn/config.xml”;而“cn/config-*.xml”将匹配“cn/config-dao.xml”;

         “**”:匹配路径中的零个或多个目录,如“cn/**/config.xml”将匹配“cn /config.xml”,也匹配“cn/javass/spring/config.xml”;而“cn/javass/config-**.xml”将匹配“cn/javass/config-dao.xml”,即把“**”当做两个“*”处理。

 

Spring提供AntPathMatcher来进行Ant风格的路径匹配。具体测试请参考cn.javass.spring.chapter4. AntPathMatcherTest。

 

Spring在加载类路径资源时除了提供前缀“classpath:”的来支持加载一个Resource,还提供一个前缀“classpath*:”来支持加载所有匹配的类路径Resource。

 

Spring提供ResourcePatternResolver接口来加载多个Resource,该接口继承了ResourceLoader并添加了“Resource[] getResources(String locationPattern)”用来加载多个Resource:

 

java代码:
  1. public interface ResourcePatternResolver extends ResourceLoader {  
  2.        String CLASSPATH_ALL_URL_PREFIX = "classpath*:";  
  3.        Resource[] getResources(String locationPattern) throws IOException;  
  4. }  

 

Spring提供了一个ResourcePatternResolver实现PathMatchingResourcePatternResolver,它是基于模式匹配的,默认使用AntPathMatcher进行路径匹配,它除了支持ResourceLoader支持的前缀外,还额外支持“classpath*:”用于加载所有匹配的类路径Resource,ResourceLoader不支持前缀“classpath*:”:

 

首先做下准备工作,在项目的“resources”创建“META-INF”目录,然后在其下创建一个“INDEX.LIST”文件。同时在“org.springframework.beans-3.0.5.RELEASE.jar”和“org.springframework.context-3.0.5.RELEASE.jar”两个jar包里也存在相同目录和文件。然后创建一个“LICENSE”文件,该文件存在于“com.springsource.cn.sf.cglib-2.2.0.jar”里。

 

 

一、“classpath”: 用于加载类路径(包括jar包)中的一个且仅一个资源;对于多个匹配的也只返回一个,所以如果需要多个匹配的请考虑“classpath*:”前缀;

 

java代码:
  1. @Test  
  2. public void testClasspathPrefix() throws IOException {  
  3.     ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();  
  4.     //只加载一个绝对匹配Resource,且通过ResourceLoader.getResource进行加载  
  5.     Resource[] resources=resolver.getResources("classpath:META-INF/INDEX.LIST");  
  6.     Assert.assertEquals(1, resources.length);  
  7.     //只加载一个匹配的Resource,且通过ResourceLoader.getResource进行加载  
  8.     resources = resolver.getResources("classpath:META-INF/*.LIST");  
  9.     Assert.assertTrue(resources.length == 1);             
  10. }  

 

二、“classpath*”: 用于加载类路径(包括jar包)中的所有匹配的资源。带通配符的classpath使用“ClassLoader”的“Enumeration<URLgetResources(String name)”方法来查找通配符之前的资源,然后通过模式匹配来获取匹配的资源。如“classpath:META-INF/*.LIST”将首先加载通配符之前的目录“META-INF”,然后再遍历路径进行子路径匹配从而获取匹配的资源。

 

java代码:
  1. @Test  
  2. public void testClasspathAsteriskPrefix () throws IOException {  
  3.      ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();        
  4.      //将加载多个绝对匹配的所有Resource  
  5.     //将首先通过ClassLoader.getResources("META-INF")加载非模式路径部分  
  6.     //然后进行遍历模式匹配  
  7.     Resource[] resources=resolver.getResources("classpath*:META-INF/INDEX.LIST");  
  8.     Assert.assertTrue(resources.length > 1);      
  9.     //将加载多个模式匹配的Resource  
  10.     resources = resolver.getResources("classpath*:META-INF/*.LIST");  
  11.     Assert.assertTrue(resources.length > 1);    
  12. }  

 

注意“resources.length >1”说明返回多个Resource。不管模式匹配还是非模式匹配只要匹配的都将返回。

 

       在“com.springsource.cn.sf.cglib-2.2.0.jar”里包含“asm-license.txt”文件,对于使用“classpath*: asm-*.txt”进行通配符方式加载资源将什么也加载不了“asm-license.txt”文件,注意一定是模式路径匹配才会遇到这种问题。这是由于“ClassLoader”的“getResources(String name)”方法的限制,对于name为“”的情况将只返回文件系统的类路径,不会包换jar包根路径。

 

 

java代码:
  1. @Test  
  2. public void testClasspathAsteriskPrefixLimit() throws IOException {  
  3.     ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();      //将首先通过ClassLoader.getResources("")加载目录,  
  4.     //将只返回文件系统的类路径不返回jar的跟路径  
  5.     //然后进行遍历模式匹配  
  6.     Resource[] resources = resolver.getResources("classpath*:asm-*.txt");  
  7.     Assert.assertTrue(resources.length == 0);  
  8.     //将通过ClassLoader.getResources("asm-license.txt")加载  
  9.     //asm-license.txt存在于com.springsource.net.sf.cglib-2.2.0.jar  
  10.     resources = resolver.getResources("classpath*:asm-license.txt");  
  11.     Assert.assertTrue(resources.length > 0);       
  12.     //将只加载文件系统类路径匹配的Resource  
  13.     resources = resolver.getResources("classpath*:LICENS*");  
  14.     Assert.assertTrue(resources.length == 1);  
  15. }  

 

对于“resolver.getResources("classpath*:asm-*.txt");”,由于在项目“resources”目录下没有所以应该返回0个资源;“resolver.getResources("classpath*:asm-license.txt");”将返回jar包里的Resource;“resolver.getResources("classpath*:LICENS*");”,因为将只返回文件系统类路径资源,所以返回1个资源。

 

因此加载通配符路径时(即路径中包含通配符),必须包含一个根目录才能保证加载的资源是所有的,而不是部分。

 

 

三、“file”:加载一个或多个文件系统中的Resource。如“file:D:/*.txt”将返回D盘下的所有txt文件;      

 

四、无前缀:通过ResourceLoader实现加载一个资源。

 

AppliacationContext提供的getResources方法将获取资源委托给ResourcePatternResolver实现,默认使用PathMatchingResourcePatternResolver。所有在此就无需介绍其使用方法了。

 

4.4.2  注入Resource数组

       Spring还支持注入Resource数组,直接看配置如下:

 

java代码:
  1. <bean id="resourceBean1" class="cn.javass.spring.chapter4.bean.ResourceBean4">  
  2. <property name="resources">  
  3.         <array>  
  4.             <value>cn/javass/spring/chapter4/test1.properties</value>  
  5.             <value>log4j.xml</value>  
  6.         </array>  
  7.     </property>  
  8. </bean>  
  9. <bean id="resourceBean2" class="cn.javass.spring.chapter4.bean.ResourceBean4">  
  10. <property name="resources" value="classpath*:META-INF/INDEX.LIST"/>  
  11. </bean>  
  12. <bean id="resourceBean3" class="cn.javass.spring.chapter4.bean.ResourceBean4">  
  13. <property name="resources">  
  14.         <array>  
  15.             <value>cn/javass/spring/chapter4/test1.properties</value>  
  16.             <value>classpath*:META-INF/INDEX.LIST</value>  
  17.         </array>  
  18.     </property>  
  19. </bean>  

 

       “resourceBean1”就不用多介绍了,传统实现方式;对于“resourceBean2”则使用前缀“classpath*”,看到这大家应该懂的,加载匹配多个资源;“resourceBean3”是混合使用的;测试代码在“cn.javass.spring.chapter4.ResourceInjectTest.testResourceArrayInject”。

       Spring通过ResourceArrayPropertyEditor来进行类型转换的,而它又默认使用“PathMatchingResourcePatternResolver”来进行把路径解析为Resource对象。所有大家只要会使用“PathMatchingResourcePatternResolver”,其它一些实现都是委托给它的,比如AppliacationContext的“getResources”方法等。

 

4.4.3  AppliacationContext实现对各种Resource的支持

       一、ClassPathXmlApplicationContext默认将通过classpath进行加载返回ClassPathResource,提供两类构造器方法:

 

java代码:
  1. public class ClassPathXmlApplicationContext {  
  2.     //1)通过ResourcePatternResolver实现根据configLocation获取资源  
  3.        public ClassPathXmlApplicationContext(String configLocation);  
  4.        public ClassPathXmlApplicationContext(String... configLocations);  
  5.        public ClassPathXmlApplicationContext(String[] configLocations, ……);  
  6.         
  7.     //2)通过直接根据path直接返回ClasspathResource  
  8.        public ClassPathXmlApplicationContext(String path, Class clazz);  
  9.        public ClassPathXmlApplicationContext(String[] paths, Class clazz);  
  10.        public ClassPathXmlApplicationContext(String[] paths, Class clazz, ……);  
  11. }  

 

       第一类构造器是根据提供的配置文件路径使用“ResourcePatternResolver ”的“getResources()”接口通过匹配获取资源;即如“classpath:config.xml”

       第二类构造器则是根据提供的路径和clazz来构造ClassResource资源。即采用“public ClassPathResource(String path, Class<?> clazz)”构造器获取资源。

 

 

       二、FileSystemXmlApplicationContext将加载相对于当前工作目录的“configLocation”位置的资源,注意在linux系统上不管“configLocation”是否带“/”,都作为相对路径;而在window系统上如“D:/resourceInject.xml”是绝对路径。因此在除非很必要的情况下,不建议使用该ApplicationContext。

 

java代码:
  1. public class FileSystemXmlApplicationContext{  
  2.        public FileSystemXmlApplicationContext(String configLocation);  
  3.        public FileSystemXmlApplicationContext(String... configLocations,……);  
  4. }  

 

 

 

java代码:
  1. //linux系统,以下全是相对于当前vm路径进行加载  
  2. new FileSystemXmlApplicationContext("chapter4/config.xml");  
  3. new FileSystemXmlApplicationContext("/chapter4/confg.xml");  
  1. //windows系统,第一个将相对于当前vm路径进行加载;  
  2. //第二个则是绝对路径方式加载  
  3. new FileSystemXmlApplicationContext("chapter4/config.xml");  
  4. new FileSystemXmlApplicationContext("d:/chapter4/confg.xml");  

 

 

       此处还需要注意:在linux系统上,构造器使用的是相对路径,而ctx.getResource()方法如果以“/”开头则表示获取绝对路径资源,而不带前导“/”将返回相对路径资源。如下:

 

java代码:
  1. //linux系统,第一个将相对于当前vm路径进行加载;  
  2. //第二个则是绝对路径方式加载  
  3. ctx.getResource ("chapter4/config.xml");  
  4. ctx.getResource ("/root/confg.xml");  
  5. //windows系统,第一个将相对于当前vm路径进行加载;  
  6. //第二个则是绝对路径方式加载  
  7. ctx.getResource ("chapter4/config.xml");  
  8. ctx.getResource ("d:/chapter4/confg.xml");  

 

       因此如果需要加载绝对路径资源最好选择前缀“file”方式,将全部根据绝对路径加载。如在linux系统“ctx.getResource ("file:/root/confg.xml");”    

 

 

原创内容,转自请注明出处【http://sishuok.com/forum/blogPost/list/0/2458.html

 

17
1
分享到:
评论
10 楼 veesn 2019-07-19  
-----------------------------
在“com.springsource.cn.sf.cglib-2.2.0.jar”里包含“asm-license.txt”文件,对于使用“classpath*: asm-*.txt”进行通配符方式加载资源将什么也加载不了“asm-license.txt”文件,注意一定是模式路径匹配才会遇到这种问题。这是由于“ClassLoader”的“getResources(String name)”方法的限制,对于name为“”的情况将只返回文件系统的类路径,不会包换jar包根路径。
-----------------------
备注一下,看了下源码,spring4已经修复这个问题,在PathMatchingResourcePatternResolver.doFindAllClassPathResources()中有addAllClassLoaderJarRoots()处理这个问题。
9 楼 一团毛线 2015-05-15  

 Resource[] resources=resolver.getResources("classpath:META-INF/INDEX.LIST");



这一句代码只能匹配到jar包里的INDEX.LIST,无法匹配ressources文件夹里的资源,为什么?
我用的是spring4
8 楼 leilitop 2014-06-24  
yunye 写道
  博主, 我还是不怎么理解InputStreamResource只能读取一次的问题,
 
  例如,使用InputStreamResource构造XmlBeanFactory会抛异常。
 
 
     InputStream is = new FileInputStream(new File("conf/beans.xml"));
     Resource resource = new InputStreamResource(is);
     BeanFactory beanFactory = new XmlBeanFactory(resource);
   


   spring文档也说,这是个 已经 打开资源的描述符-因此 isOpen() 函数返回 true。 如果你需要在其它位置保持这个资源的描述符或者多次读取一个流,请不要使用它。

  我的问题是:怎么怎么理解InputStreamResource只能读取一次呢? 是不是因为构造InputStreamResource的时候,资源(假设是Xml配置文件)已经被打开了,返回一个InputStream字节流,因为这个资源没有被关闭,spring需要再次读取资源(Xml配置文件)验证xml schema 语法, 以致构造XmlBeanFactory抛异常? 如果是这样,spring怎么不直接读取这个返回的InputStream字节流呢?
  
  使用InputStreamResource构造XmlBeanFactory抛异常, 是spring1.x和spring2.x版本差异导致的问题吗?

网上看到的
“原因是从spring2.0开始,为了支持xml schema,spring会在后台打开配置文件,检查配置文件是否遵循了DTD 和 schema,所以 isOpen() 方法返回true。以致抛出异常。从spring2.0开始,已经不建议使用InputStreamResource。”
7 楼 wsj356428476 2012-11-14  
6 楼 縌流而上的魚 2012-10-16  
再问一个2B的问题,如有懂的请教下,谢谢!!!!

“在项目的“resources”创建“META-INF”目录”中“resources”是指“src”目录下吗?
5 楼 feipigzi 2012-10-14  
zuisanlang 写道
博主,能再详细解释一下下面这段话的意思吗?

在“com.springsource.cn.sf.cglib-2.2.0.jar”里包含“asm-license.txt”文件,对于使用“classpath*: asm-*.txt”进行通配符方式加载资源将什么也加载不了“asm-license.txt”文件,注意一定是模式路径匹配才会遇到这种问题。这是由于“ClassLoader”的“getResources(String name)”方法的限制,对于name为“”的情况将只返回文件系统的类路径,不会包换jar包根路径。

我们是想加载“asm-license.txt”文件,如果使用“classpath*: asm-*.txt”作为通配符的话,跟你后面说的name为“”的情况有什么关系?


结合作者这段注释理解
//将加载多个绝对匹配的所有Resource 
    //将首先通过ClassLoader.getResources("META-INF")加载非模式路径部分 
    //然后进行遍历模式匹配 
    Resource[] resources=resolver.getResources("classpath*:META-INF/INDEX.LIST"); 
4 楼 縌流而上的魚 2012-10-12  
你好。又碰到问题了。
resources = resolver.getResources("classpath*:META-INF/*.LIST");  
    Assert.assertTrue(resources.length > 1);


这里我总是找不到INDEX.LIST文件,是怎么回事啊?

我之前建立的工程是“Dynamic Web Project”而不是单纯的java工程,这个web工程自带了META-INF的目录,路径是“WebContent/META-INF”。而不是在工程目录下直接建了“META-INF”的目录,这个有影响吗?
前面一句代码:
Resource[] resource = resolver				.getResources("classpath:META-INF/INDEX.LIST");

读取是正常的!但是好像读取的不是我建立的这个文件。。能帮忙解释下吗。
3 楼 zuisanlang 2012-06-21  
博主,能再详细解释一下下面这段话的意思吗?

在“com.springsource.cn.sf.cglib-2.2.0.jar”里包含“asm-license.txt”文件,对于使用“classpath*: asm-*.txt”进行通配符方式加载资源将什么也加载不了“asm-license.txt”文件,注意一定是模式路径匹配才会遇到这种问题。这是由于“ClassLoader”的“getResources(String name)”方法的限制,对于name为“”的情况将只返回文件系统的类路径,不会包换jar包根路径。

我们是想加载“asm-license.txt”文件,如果使用“classpath*: asm-*.txt”作为通配符的话,跟你后面说的name为“”的情况有什么关系?
2 楼 jinnianshilongnian 2012-03-20  
yunye 写道
  博主, 我还是不怎么理解InputStreamResource只能读取一次的问题,
 
  例如,使用InputStreamResource构造XmlBeanFactory会抛异常。
 
 
     InputStream is = new FileInputStream(new File("conf/beans.xml"));
     Resource resource = new InputStreamResource(is);
     BeanFactory beanFactory = new XmlBeanFactory(resource);
   


   spring文档也说,这是个 已经 打开资源的描述符-因此 isOpen() 函数返回 true。 如果你需要在其它位置保持这个资源的描述符或者多次读取一个流,请不要使用它。

  我的问题是:怎么怎么理解InputStreamResource只能读取一次呢? 是不是因为构造InputStreamResource的时候,资源(假设是Xml配置文件)已经被打开了,返回一个InputStream字节流,因为这个资源没有被关闭,spring需要再次读取资源(Xml配置文件)验证xml schema 语法, 以致构造XmlBeanFactory抛异常? 如果是这样,spring怎么不直接读取这个返回的InputStream字节流呢?
  
  使用InputStreamResource构造XmlBeanFactory抛异常, 是spring1.x和spring2.x版本差异导致的问题吗?


我这里说的只能读取一次意思是
InputStream 这个流读完后 不能返回到流开头(重新读,即不reset,所以只能读取一次【如果还需使用需要再创建一个】),表达的不好,请见谅
1 楼 yunye 2012-03-19  
  博主, 我还是不怎么理解InputStreamResource只能读取一次的问题,
 
  例如,使用InputStreamResource构造XmlBeanFactory会抛异常。
 
 
     InputStream is = new FileInputStream(new File("conf/beans.xml"));
     Resource resource = new InputStreamResource(is);
     BeanFactory beanFactory = new XmlBeanFactory(resource);
   


   spring文档也说,这是个 已经 打开资源的描述符-因此 isOpen() 函数返回 true。 如果你需要在其它位置保持这个资源的描述符或者多次读取一个流,请不要使用它。

  我的问题是:怎么怎么理解InputStreamResource只能读取一次呢? 是不是因为构造InputStreamResource的时候,资源(假设是Xml配置文件)已经被打开了,返回一个InputStream字节流,因为这个资源没有被关闭,spring需要再次读取资源(Xml配置文件)验证xml schema 语法, 以致构造XmlBeanFactory抛异常? 如果是这样,spring怎么不直接读取这个返回的InputStream字节流呢?
  
  使用InputStreamResource构造XmlBeanFactory抛异常, 是spring1.x和spring2.x版本差异导致的问题吗?

相关推荐

    跟我学spring3(1-7)

    【第四章】 资源 之 4.4 Resource通配符路径 ——跟我学spring3 【第五章】Spring表达式语言 之 5.1 概述 5.2 SpEL基础 ——跟我学spring3 【第五章】Spring表达式语言 之 5.3 SpEL语法 ——跟我学spring3 【第五章...

    跟开涛学Spring

    1.14 【第四章】 资源 之 4.4 Resource通配符路径 ——跟我学spring3 . . . . . . . . . . . . . . . . . . . . . . . .171 1.15 【第五章】Spring表达式语言 之 5.1 概述 5.2 SpEL基础 ——跟我学spring3 . . . . ...

    跟我学spring3(1-7).pdf

    Spring概述2.1 IoC基础2.2 IoC 容器基本原理2.3 IoC的配置使用——跟我学Spring33.1 DI的配置使用3.2 循环依赖3.3 更多DI的知识 3.4 Bean的作用域 4.1 基础知识4.2 内置Resource实现4.3 访问Resource4.4 Resource...

    Spring源码含有通配符路径解析一[文].pdf

    Spring源码含有通配符路径解析一[文].pdf

    Spring.3.x企业应用开发实战(完整版).part2

    Spring3.0是Spring在积蓄了3年之久后,隆重推出的一个重大升级版本,进一步加强了Spring作为Java领域第一开源平台的翘楚地位。  Spring3.0引入了众多Java开发者翘首以盼的新功能和新特性,如OXM、校验及格式化框架...

    Spring3.x企业应用开发实战(完整版) part1

    Spring3.0是Spring在积蓄了3年之久后,隆重推出的一个重大升级版本,进一步加强了Spring作为Java领域第一开源平台的翘楚地位。  Spring3.0引入了众多Java开发者翘首以盼的新功能和新特性,如OXM、校验及格式化框架...

    Spring 2.0 开发参考手册

    4.7.2. Application context构造器中资源路径的通配符 4.7.3. FileSystemResource 提示 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 5.3. 从错误代码到...

    Spring-Reference_zh_CN(Spring中文参考手册)

    4.7.2. Application context构造器中资源路径的通配符 4.7.2.1. Ant风格的pattern 4.7.2.2. classpath*: 前缀 4.7.2.3. 其他关于通配符的说明 4.7.3. FileSystemResource 提示 5. 校验,数据绑定,BeanWrapper,与...

    spring chm文档

    4.7.2. Application context构造器中资源路径的通配符 4.7.3. FileSystemResource 提示 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 5.3. 从错误代码到...

    Spring中文帮助文档

    4.7.2. Application context构造器中资源路径的通配符 4.7.3. FileSystemResource 说明 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 5.3. 从错误代码到...

    Java使用路径通配符加载Resource与profiles配置使用详解

    主要介绍了Java使用路径通配符加载Resource与profiles配置使用详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

    Spring API

    4.7.2. Application context构造器中资源路径的通配符 4.7.3. FileSystemResource 说明 5. 校验,数据绑定,BeanWrapper,与属性编辑器 5.1. 简介 5.2. 使用Spring的Validator接口进行校验 5.3. 从错误代码到...

    Java Web编程宝典-十年典藏版.pdf.part2(共2个)

    共24章,其中,第1篇为技能学习篇,主要包括Java Web开发环境、JSP语法、JSP内置对象、Java Bean技术、Servlet技术、EL与JSTL标签库、数据库应用开发、初识Struts2基础、揭密Struts2高级技术、Hib锄劬e技术入门、...

    WHICHX:使用通配符在 MATLAB 搜索路径中搜索文件。-matlab开发

    使用通配符在 MATLAB 搜索路径中搜索 WHICHX 文件 命令窗口中的输出是链接的,因此可以直接在编辑器或 GUIDE 中启动 M-Files,打开 MDL-、FIG-files 和其他类型。 请看截图。 例子: --- WHICHX *.m 列出了 matlab ...

    Makefile之通配符探究

    Makefile之通配符探究 1、wildcard : 扩展通配符 2、notdir : 去除路径 3、patsubst :替换通配符

    字符串/通配符匹配(C++)

    C++实现字符串匹配函数,匹配中可以包括通配符

    易语言文本实现匹配通配符

    易语言文本实现匹配通配符源码,文本实现匹配通配符

    前端学习第四天.通配符选择器7.26.html

    前端学习第四天.通配符选择器7.26.html

    Word查找替换之代码和通配符一览表

    Word查找替换之代码和通配符一览表

    中文子网掩码和通配符掩码计算器

    中文子网掩码和通配符掩码计算器 简单实用

Global site tag (gtag.js) - Google Analytics