Commit e10a4c2c30039d5aa39ef44d5036d8a89da3a254

Authored by zhangdaiscott
1 parent 870ec330

JeecgBoot 2.4 微服务正式版本发布,基于SpringBoot的低代码平台

jeecg-boot/jeecg-boot-module-system/src/main/resources/application-dev.yml
... ... @@ -131,7 +131,7 @@ spring:
131 131 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
132 132 datasource:
133 133 master:
134   - url: jdbc:mysql://127.0.0.1:3306/jeecg-boot-os-re?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
  134 + url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai
135 135 username: root
136 136 password: root
137 137 driver-class-name: com.mysql.cj.jdbc.Driver
... ...
jeecg-boot/jeecg-cloud-module/jeecg-cloud-system-start/src/main/java/org/jeecg/JeecgSystemApplication.java 0 → 100644
  1 +package org.jeecg;
  2 +
  3 +import lombok.extern.slf4j.Slf4j;
  4 +import org.apache.catalina.Context;
  5 +import org.apache.tomcat.util.scan.StandardJarScanner;
  6 +import org.jeecg.common.util.oConvertUtils;
  7 +import org.springframework.boot.SpringApplication;
  8 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  9 +import org.springframework.boot.builder.SpringApplicationBuilder;
  10 +import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
  11 +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  12 +import org.springframework.cloud.openfeign.EnableFeignClients;
  13 +import org.springframework.context.ConfigurableApplicationContext;
  14 +import org.springframework.context.annotation.Bean;
  15 +import org.springframework.core.env.Environment;
  16 +
  17 +import java.net.InetAddress;
  18 +import java.net.UnknownHostException;
  19 +
  20 +@Slf4j
  21 +@SpringBootApplication
  22 +@EnableFeignClients(basePackages = {"org.jeecg"})
  23 +public class JeecgSystemApplication extends SpringBootServletInitializer {
  24 +
  25 + @Override
  26 + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
  27 + return application.sources(JeecgSystemApplication.class);
  28 + }
  29 +
  30 + public static void main(String[] args) throws UnknownHostException {
  31 + ConfigurableApplicationContext application = SpringApplication.run(JeecgSystemApplication.class, args);
  32 + Environment env = application.getEnvironment();
  33 + String ip = InetAddress.getLocalHost().getHostAddress();
  34 + String port = env.getProperty("server.port");
  35 + String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
  36 + log.info("\n----------------------------------------------------------\n\t" +
  37 + "Application Jeecg-Boot is running! Access URLs:\n\t" +
  38 + "Local: \t\thttp://localhost:" + port + path + "/doc.html\n" +
  39 + "External: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
  40 + "Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
  41 + "----------------------------------------------------------");
  42 +
  43 + }
  44 +
  45 + /**
  46 + * tomcat-embed-jasper引用后提示jar找不到的问题
  47 + */
  48 + @Bean
  49 + public TomcatServletWebServerFactory tomcatFactory() {
  50 + return new TomcatServletWebServerFactory() {
  51 + @Override
  52 + protected void postProcessContext(Context context) {
  53 + ((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
  54 + }
  55 + };
  56 + }
  57 +}
0 58 \ No newline at end of file
... ...