Search in sources :

Example 1 with CustomService

use of com.megagao.production.ssm.service.CustomService in project production_ssm by megagao.

the class test method test1.

@Test
public void test1() throws Exception {
    @SuppressWarnings("resource") ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext-*.xml");
    CustomService customService = (CustomService) context.getBean("customServiceImpl");
    Custom custom = new Custom();
    custom.setCustomId("1253");
    custom.setCustomName("aaa");
    customService.insert(custom);
}
Also used : ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) ApplicationContext(org.springframework.context.ApplicationContext) CustomService(com.megagao.production.ssm.service.CustomService) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) Custom(com.megagao.production.ssm.domain.Custom) Test(org.junit.Test)

Aggregations

Custom (com.megagao.production.ssm.domain.Custom)1 CustomService (com.megagao.production.ssm.service.CustomService)1 Test (org.junit.Test)1 ApplicationContext (org.springframework.context.ApplicationContext)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1