예제 #1
0
  @Test
  public void test() {
    BaseApplicationContext context =
        DefaultApplicationContext.getApplicationContext("com/sany/mail/property-mail.xml");
    SendMail sendMail = context.getTBeanObject("sendMail", SendMail.class);
    sendMail.sendTextMail(new String[] {"*****@*****.**"}, "你好", "很好,很强大!");
    String content =
        " <table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" height=\"96\">"
            + "<tr>"
            + "<td width=\"24%\" height=\"94\"><a href='http://ippresource.sany.com.cn/qikan/html/2013-04/29/node_1.htm' target='_blank'><img width='80' height='90' border='0' src='uploadfiles/201207/20120731060411867.jpg'></a></td>"
            + "<td width=\"76%\" valign=\"top\"><div><strong>三一集团报</strong></div>"
            + "<div><span class=\"red\">三一集团报</span> <a href=\"javascript:void('0')\" onclick=\"showPdf('http://ippresource.sany.com.cn/qikan/html/2013-04/29/node_1.htm')\">浏览</a>|<a href='brands/magazine/default.htm' target='_blank'>更多 >></a></div>"
            + "<div>做一流企业,办一流企业报。《三一集团》报1999年创刊,它见证记载了三一发展的艰辛和辉煌。</div></td>"
            + "</tr>"
            + "</table>";

    sendMail.sendHtmlMail(new String[] {"*****@*****.**"}, "你好html", content);
    sendMail.sendAttach(
        new String[] {"*****@*****.**"},
        "你好html",
        content,
        new String[] {
          "D:\\workspace\\SanyPDP\\resources\\org\\frameworkset\\task\\quarts-task.xml"
        });
  }
예제 #2
0
public class SAPUtil {
  static BaseApplicationContext context =
      DefaultApplicationContext.getApplicationContext("com/sany/sap/connection/sapserver.xml");

  public static SapConnectFactory getSapConnectFactory(String factory) {
    return context.getTBeanObject(factory, SapConnectFactory.class);
  }
}
예제 #3
0
  @Test
  public void testFullBBossSerializable() throws Exception {
    BaseApplicationContext context =
        DefaultApplicationContext.getApplicationContext("org/frameworkset/soa/xblink/test.xml");
    Test1 test1 = context.getTBeanObject("test1", Test1.class);

    //		byte[] cs = oldObjectToByteBuffer(test1) ;
    String ss = ObjectSerializable.toXML(test1);
    Test1 test1_ = (Test1) ObjectSerializable.toBean(ss, Test1.class);
    System.out.println();
  }
예제 #4
0
 @Test
 public void testFullBBossSerializable1() throws Exception {
   // 加载配置文件,构建一个组件容器对象
   BaseApplicationContext context =
       DefaultApplicationContext.getApplicationContext(
           "org/frameworkset/soa/xblink/testcontainref.xml");
   // 获取组件test1
   Test1 test1 = context.getTBeanObject("test1", Test1.class);
   // 重新将组件序列化为xml串
   String ss = ObjectSerializable.toXML(test1);
   // 将xml串ss转换为对象test_
   Test1 test1_ = (Test1) ObjectSerializable.toBean(ss, Test1.class);
   System.out.println();
 }
예제 #5
0
파일: TestCase.java 프로젝트: sqidea/bboss
	@Before
	public void init()
	{
		context = ApplicationContext.getApplicationContext("org/frameworkset/spi/properties/abc/mutilreference.xml");
		context1 = DefaultApplicationContext.getApplicationContext("org/frameworkset/spi/properties/abc/test.xml");
	}