|
|
|
|
@ -15,39 +15,18 @@
|
|
|
|
|
*/
|
|
|
|
|
package me.zhengjie;
|
|
|
|
|
|
|
|
|
|
import javax.persistence.EntityManager;
|
|
|
|
|
import javax.persistence.PersistenceContext;
|
|
|
|
|
import javax.persistence.Query;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
import java.util.function.Function;
|
|
|
|
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
|
import org.springframework.boot.context.ApplicationPidFileWriter;
|
|
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
|
import org.springframework.data.domain.Example;
|
|
|
|
|
import org.springframework.data.domain.Page;
|
|
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
|
|
import org.springframework.data.domain.Sort;
|
|
|
|
|
import org.springframework.data.jpa.domain.Specification;
|
|
|
|
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
|
|
|
|
import org.springframework.data.repository.query.FluentQuery.FetchableFluentQuery;
|
|
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import com.alipay.api.domain.Goods;
|
|
|
|
|
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
|
|
|
|
import me.zhengjie.mapper.db1.IStoreMapper;
|
|
|
|
|
import me.zhengjie.mapper.db2.IStoreMapper2;
|
|
|
|
|
import me.zhengjie.modules.goods.repository.GoodsRepository;
|
|
|
|
|
import me.zhengjie.utils.SpringContextHolder;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@ -79,8 +58,8 @@ public class AppRun {
|
|
|
|
|
return new SpringContextHolder();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private final IStoreMapper iStoreMapper;
|
|
|
|
|
private final IStoreMapper2 iStoreMapper2;
|
|
|
|
|
// private final IStoreMapper iStoreMapper;
|
|
|
|
|
// private final IStoreMapper2 iStoreMapper2;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 访问首页提示
|
|
|
|
|
@ -90,8 +69,8 @@ public class AppRun {
|
|
|
|
|
@AnonymousGetMapping("/")
|
|
|
|
|
@Transactional
|
|
|
|
|
public String index() {
|
|
|
|
|
System.out.println(iStoreMapper.findByName("店1"));
|
|
|
|
|
System.out.println(iStoreMapper2.findByName("店1"));
|
|
|
|
|
// System.out.println(iStoreMapper.findByName("店1"));
|
|
|
|
|
// System.out.println(iStoreMapper2.findByName("店1"));
|
|
|
|
|
// test();
|
|
|
|
|
return "Backend service started successfully";
|
|
|
|
|
}
|
|
|
|
|
|