瀏覽代碼

梳理了一下项目结构,编写和测试积分的相关功能(但有bug,不能再jsp页面中显示出来)

superb 2 年之前
父節點
當前提交
aef737e59d
共有 3 個文件被更改,包括 36 次插入5 次删除
  1. 20 4
      pom.xml
  2. 0 1
      src/main/resources/application.properties
  3. 16 0
      src/main/resources/application.yml

+ 20 - 4
pom.xml

@@ -21,10 +21,10 @@
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-jdbc</artifactId>
             <artifactId>spring-boot-starter-jdbc</artifactId>
         </dependency>
         </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-security</artifactId>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-starter-security</artifactId>-->
+<!--        </dependency>-->
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
             <artifactId>spring-boot-starter-web</artifactId>
@@ -40,6 +40,7 @@
             <artifactId>mysql-connector-j</artifactId>
             <artifactId>mysql-connector-j</artifactId>
             <scope>runtime</scope>
             <scope>runtime</scope>
         </dependency>
         </dependency>
+
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-configuration-processor</artifactId>
             <artifactId>spring-boot-configuration-processor</artifactId>
@@ -60,6 +61,21 @@
             <artifactId>spring-security-test</artifactId>
             <artifactId>spring-security-test</artifactId>
             <scope>test</scope>
             <scope>test</scope>
         </dependency>
         </dependency>
+
+        <!--引入Spring Boot内嵌的Tomcat对JSP的解析包,不加解析不了jsp页面-->
+        <!--如果只是使用JSP页面,可以只添加该依赖-->
+        <dependency>
+            <groupId>org.apache.tomcat.embed</groupId>
+            <artifactId>tomcat-embed-jasper</artifactId>
+        </dependency>
+
+        <!--如果使用JSTL必须添加该依赖-->
+        <!--jstl标签依赖的jar包start-->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>jstl</artifactId>
+        </dependency>
+
     </dependencies>
     </dependencies>
 
 
     <build>
     <build>

+ 0 - 1
src/main/resources/application.properties

@@ -1 +0,0 @@
-

+ 16 - 0
src/main/resources/application.yml

@@ -0,0 +1,16 @@
+server:
+  port: 8080
+
+spring:
+  mvc:
+    view:
+      prefix: /jsp/
+      suffix: .jsp
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://localhost:3306/superb?useSSL=false&serverTimezone=UTC&characterEncoding=utf-8
+    username: root
+    password: 123456
+
+
+