Переглянути джерело

Spring cloud 版本升级

suxiaoyang 6 роки тому
батько
коміт
872674d4f3

+ 3 - 3
mysql-starter/src/main/java/com/yihu/mysql/query/BaseJpaService.java

@ -1,6 +1,6 @@
package com.yihu.mysql.query;
import com.yihu.utils.context.SpringContext;
import com.yihu.utils.context.SpringContextUtils;
import org.hibernate.Query;
import org.hibernate.Session;
import org.springframework.beans.BeanUtils;
@ -209,11 +209,11 @@ public abstract class BaseJpaService<T, R extends CrudRepository> {
    }
    public JpaRepository getJpaRepository(){
        return (JpaRepository) SpringContext.getService(repoClass);
        return (JpaRepository) SpringContextUtils.getService(repoClass);
    }
    public R getRepository() {
        return SpringContext.getService(repoClass);
        return SpringContextUtils.getService(repoClass);
    }
    public Session currentSession() {

+ 1 - 1
utils/src/main/java/com/yihu/utils/context/SpringContext.java

@ -15,7 +15,7 @@ import org.springframework.util.ClassUtils;
 * @created 12-05-2015 17:47:55
 */
@Component
public class SpringContext implements ApplicationContextAware {
public class SpringContextUtils implements ApplicationContextAware {
    private static ApplicationContext springContext = null;
    /**