13693261870
2024-07-16 7552b0a524ed73d00c99cdde2e3c6d6a718ae59d
添加配置文件
已添加2个文件
已修改2个文件
79 ■■■■■ 文件已修改
pom.xml 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/se/simu/SimuApplication.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-dev.yml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application-prod.yml 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pom.xml
@@ -8,6 +8,7 @@
        <version>2.7.18</version>
        <relativePath/>
    </parent>
    <packaging>jar</packaging>
    <groupId>com.se</groupId>
    <artifactId>simu</artifactId>
@@ -114,12 +115,32 @@
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>dev</id>
            <properties>
                <activatedProperties>dev</activatedProperties>
            </properties>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
        </profile>
        <profile>
            <id>prod</id>
            <properties>
                <activatedProperties>prod</activatedProperties>
            </properties>
        </profile>
    </profiles>
    <build>
        <finalName>simu</finalName>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <mainClass>com.se.simu.SimuApplication</mainClass>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
src/main/java/com/se/simu/SimuApplication.java
@@ -4,6 +4,12 @@
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
 * å¯åŠ¨ç¨‹åºç±»
 *
 * @author WWW
 * @date 2024-07-16
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}, scanBasePackages = {"com.se.simu"})
public class SimuApplication {
    public static void main(String[] args) {
src/main/resources/application-dev.yml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
server:
  tomcat:
    uri-encoding: UTF-8
    max-connections: 5000
    max-http-form-post-size: 50MB
    threads:
      max: 2000
  port: 8079
  servlet:
    context-path: /simuserver
spring:
  mvc:
    pathmatch:
      # è§£å†³Knife4j运行报错
      matching-strategy: ant_path_matcher
  application:
    name: simuserver
knife4j:
  # æ˜¯å¦å¼€å¯
  enabled: true
  # è¯·æ±‚前缀
  pathMapping:
  # æ˜¯å¦å¼€å¯å¢žå¼ºæ¨¡å¼
  enable: true
src/main/resources/application-prod.yml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
server:
  tomcat:
    uri-encoding: UTF-8
    max-connections: 5000
    max-http-form-post-size: 50MB
    threads:
      max: 2000
  port: 8079
  servlet:
    context-path: /simuserver
spring:
  mvc:
    pathmatch:
      # è§£å†³Knife4j运行报错
      matching-strategy: ant_path_matcher
  application:
    name: simuserver
knife4j:
  # æ˜¯å¦å¼€å¯
  enabled: true
  # è¯·æ±‚前缀
  pathMapping:
  # æ˜¯å¦å¼€å¯å¢žå¼ºæ¨¡å¼
  enable: true