sicong hai 2 meses
pai
achega
4f459ed317

+ 2 - 2
20250723144731/blog/blog-admin/src/main/resources/application.yml

@@ -16,7 +16,7 @@ ruoyi:
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为80
-  port: 80
+  port: 18881
   servlet:
     # 应用的访问路径
     context-path: /
@@ -30,7 +30,7 @@ server:
       max: 800
       # Tomcat启动初始化的线程数,默认值10
       min-spare: 100
- 
+
 # 日志配置
 logging:
   level:

+ 63 - 0
20250723144731/blog/blog-web/pom.xml

@@ -67,4 +67,67 @@
             <version>1.6.2</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>2.5.15</version>
+                <configuration>
+                    <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-war-plugin</artifactId>
+                <version>3.0.0</version>
+                <configuration>
+                    <failOnMissingWebXml>false</failOnMissingWebXml>
+                    <warName>${project.artifactId}</warName>
+                </configuration>
+            </plugin>
+            <!-- YUI Compressor (CSS/JS压缩)
+            <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>yuicompressor-maven-plugin</artifactId>
+                <version>1.5.1</version>
+                <executions>
+                    <execution>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>compress</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <encoding>UTF-8</encoding>
+                    <jswarn>false</jswarn>
+                    <nosuffix>true</nosuffix>
+                    <linebreakpos>50000</linebreakpos>
+                    <sourceDirectory>src/main/resources/static</sourceDirectory>
+                    <force>true</force>
+                    <includes>
+                        <include>**/*.js</include>
+                        <include>**/*.css</include>
+                    </includes>
+                    <excludes>
+                        <exclude>**/*.min.js</exclude>
+                        <exclude>**/*.min.css</exclude>
+                        <exclude>**/fileinput.js</exclude>
+                        <exclude>**/validate/**</exclude>
+                        <exclude>**/bootstrap-table/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin> -->
+        </plugins>
+        <finalName>${project.artifactId}</finalName>
+    </build>
 </project>

+ 9 - 0
20250723144731/blog/blog-web/src/main/java/cn/blog/web/controller/index/IndexController.java

@@ -0,0 +1,9 @@
+package cn.blog.web.controller.index;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller("index")
+public class IndexController {
+
+}

+ 1 - 1
20250723144731/blog/blog-web/src/main/resources/application.yml

@@ -1,7 +1,7 @@
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为80
-  port: 18880
+  port: 18882
   servlet:
     # 应用的访问路径
     context-path: /

+ 13 - 0
20250723144731/blog/blog-web/src/main/resources/templates/index.html

@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>Document</title>
+</head>
+<body>
+<h1>Hello</h1>
+</body>
+</html>