Package test

Source Code of test.MyTest

package test;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.security.web.util.AntUrlPathMatcher;
import org.springframework.security.web.util.UrlMatcher;

import com.loc.security.MySecurityMetadataSource;

public class MyTest{
  //@Test
  public void run() throws Exception{
    UrlMatcher urlMatcher = new AntUrlPathMatcher();
    String url="/**";
    String resURL="/index.jsp";
    boolean b = urlMatcher.pathMatchesUrl(resURL, url);
    System.out.println(b);
  }
  @Test
  public void run1()throws Exception{
    String s ="B8:AC:6F:4A:93:1E=33G04|192.168.3.70";
        String[] ss = s.split("=.*\\|");
        StringBuffer sb = new StringBuffer();
        sb.append(ss[1]).append("  ").append(ss[0]);
        System.out.println(sb.toString());

  }
}
TOP

Related Classes of test.MyTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.