merge: 合并 upgrade/springboot-4.0 到 develop
- 解决 pom.xml 冲突 (空行) - 解决 TokenService.java 冲突 (保留 getSigningKey() 方案) - 包含: JDK 25 + Spring Boot 4.0 特性落地
This commit is contained in:
@@ -22,6 +22,16 @@
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SB4: Flyway + JDBC 自动配置拆分到独立模块 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-flyway</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Flyway 数据库迁移 -->
|
||||
<dependency>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
@@ -79,12 +89,6 @@
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- rabbitMQ -->
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -113,10 +117,10 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.13.0</version>
|
||||
<version>3.15.0</version>
|
||||
<configuration>
|
||||
<source>17</source>
|
||||
<target>17</target>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
|
||||
@@ -3,8 +3,8 @@ package com.openhis;
|
||||
import com.openhis.web.ybmanage.config.YbServiceConfig;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
@@ -13,25 +13,14 @@ import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author system 1,2,3,4
|
||||
*/
|
||||
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, FlywayAutoConfiguration.class}, scanBasePackages = {"com.core", "com.openhis"})
|
||||
@SpringBootApplication(exclude = {
|
||||
DataSourceAutoConfiguration.class,
|
||||
FlywayAutoConfiguration.class
|
||||
}, scanBasePackages = {"com.core", "com.openhis"})
|
||||
@EnableConfigurationProperties(YbServiceConfig.class)
|
||||
@EnableAsync
|
||||
public class OpenHisApplication {
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
// 测试 Instrument 类加载
|
||||
// try {
|
||||
// Class.forName("com.openhis.administration.domain.Instrument");
|
||||
// System.out.println("Instrument class loaded successfully");
|
||||
// } catch (ClassNotFoundException e) {
|
||||
// System.err.println("Failed to load Instrument class: " + e.getMessage());
|
||||
// }
|
||||
|
||||
ConfigurableApplicationContext application = SpringApplication.run(OpenHisApplication.class, args);
|
||||
Environment env = application.getEnvironment();
|
||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.flywaydb.core.Flyway;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.flyway.FlywayMigrationInitializer;
|
||||
import org.springframework.boot.flyway.autoconfigure.FlywayMigrationInitializer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
|
||||
@@ -53,6 +53,9 @@ user:
|
||||
|
||||
# Spring配置
|
||||
spring:
|
||||
threads:
|
||||
virtual:
|
||||
enabled: true
|
||||
mvc:
|
||||
pathmatch:
|
||||
matching-strategy: ant-path-matcher
|
||||
|
||||
@@ -6,7 +6,7 @@ package com.openhis;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
import org.springframework.boot.jdbc.autoconfigure.DataSourceAutoConfiguration;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user