mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 20:50:14 +08:00
mybatis-jpa-extra
This commit is contained in:
@@ -19,7 +19,7 @@ package org.apache.mybatis.jpa.test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import org.apache.mybatis.jpa.util.WebContext;
|
||||
import org.apache.mybatis.jpa.util.JpaWebContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.maxkey.entity.Accounts;
|
||||
@@ -38,7 +38,7 @@ public class AccountsServiceTest {
|
||||
public static AccountsService service;
|
||||
|
||||
public AccountsService getservice() {
|
||||
service=(AccountsService)WebContext.getBean("accountsService");
|
||||
service=(AccountsService)JpaWebContext.getBean("accountsService");
|
||||
return service;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class AccountsServiceTest {
|
||||
|
||||
_logger.info("Application dir "+System.getProperty("user.dir"));
|
||||
context = new ClassPathXmlApplicationContext(new String[] {"spring/applicationContext.xml"});
|
||||
WebContext.applicationContext=context;
|
||||
JpaWebContext.applicationContext=context;
|
||||
getservice();
|
||||
System.out.println("init ...");
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.apache.mybatis.jpa.test;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import org.apache.mybatis.jpa.util.WebContext;
|
||||
import org.apache.mybatis.jpa.util.JpaWebContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.maxkey.entity.apps.Apps;
|
||||
@@ -38,7 +38,7 @@ public class AppsServiceTest {
|
||||
public static AppsService service;
|
||||
|
||||
public AppsService getservice() {
|
||||
service=(AppsService)WebContext.getBean("appsService");
|
||||
service=(AppsService)JpaWebContext.getBean("appsService");
|
||||
return service;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class AppsServiceTest {
|
||||
|
||||
_logger.info("Application dir "+System.getProperty("user.dir"));
|
||||
context = new ClassPathXmlApplicationContext(new String[] {"spring/applicationContext.xml"});
|
||||
WebContext.applicationContext=context;
|
||||
JpaWebContext.applicationContext=context;
|
||||
getservice();
|
||||
System.out.println("init ...");
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.util.WebContext;
|
||||
import org.apache.mybatis.jpa.util.JpaWebContext;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.maxkey.entity.apps.AppsFormBasedDetails;
|
||||
@@ -41,7 +41,7 @@ public class FormBasedDetailsServiceTest {
|
||||
public static AppsFormBasedDetailsService service;
|
||||
|
||||
public AppsFormBasedDetailsService getservice() {
|
||||
service=(AppsFormBasedDetailsService)WebContext.getBean("appsFormBasedDetailsService");
|
||||
service=(AppsFormBasedDetailsService)JpaWebContext.getBean("appsFormBasedDetailsService");
|
||||
return service;
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class FormBasedDetailsServiceTest {
|
||||
|
||||
_logger.info("Application dir "+System.getProperty("user.dir"));
|
||||
context = new ClassPathXmlApplicationContext(new String[] {"spring/applicationContext.xml"});
|
||||
WebContext.applicationContext=context;
|
||||
JpaWebContext.applicationContext=context;
|
||||
getservice();
|
||||
System.out.println("init ...");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user