xingzi 2 years ago
parent 1d8c2f7840
commit cc2eeab5f0

@ -14,3 +14,8 @@ services:
- "JAVA_OPTS=-Duser.language=zh -XX:+UseG1GC" - "JAVA_OPTS=-Duser.language=zh -XX:+UseG1GC"
- "TZ=Asia/Shanghai" - "TZ=Asia/Shanghai"
- "spring.profiles.active=prod" - "spring.profiles.active=prod"
networks:
- eladmin
networks:
eladmin:

@ -15,39 +15,18 @@
*/ */
package me.zhengjie; 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.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter; import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.context.annotation.Bean; 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.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alipay.api.domain.Goods;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.rest.AnonymousGetMapping; 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; import me.zhengjie.utils.SpringContextHolder;
/** /**
@ -79,8 +58,8 @@ public class AppRun {
return new SpringContextHolder(); return new SpringContextHolder();
} }
private final IStoreMapper iStoreMapper; // private final IStoreMapper iStoreMapper;
private final IStoreMapper2 iStoreMapper2; // private final IStoreMapper2 iStoreMapper2;
/** /**
* 访 * 访
@ -90,8 +69,8 @@ public class AppRun {
@AnonymousGetMapping("/") @AnonymousGetMapping("/")
@Transactional @Transactional
public String index() { public String index() {
System.out.println(iStoreMapper.findByName("店1")); // System.out.println(iStoreMapper.findByName("店1"));
System.out.println(iStoreMapper2.findByName("店1")); // System.out.println(iStoreMapper2.findByName("店1"));
// test(); // test();
return "Backend service started successfully"; return "Backend service started successfully";
} }

Loading…
Cancel
Save