Browse Source

0725 增加dev环境配置文件

Qing 10 months ago
parent
commit
fcfc6f6110

+ 3 - 198
novel-demo/src/main/java/com/sf/entity/BookInfo.java

@@ -3,6 +3,8 @@ package com.sf.entity;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
 import java.io.Serializable;
 import java.time.LocalDateTime;
 
@@ -14,6 +16,7 @@ import java.time.LocalDateTime;
  * @author baomidou
  * @since 2024-05-25
  */
+@Data
 @TableName("book_info")
 public class BookInfo implements Serializable {
 
@@ -120,203 +123,5 @@ public class BookInfo implements Serializable {
      */
     private LocalDateTime updateTime;
 
-    /**
-     * 类别名
-     */
-    private String categoryNamecopy;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Byte getWorkDirection() {
-        return workDirection;
-    }
-
-    public void setWorkDirection(Byte workDirection) {
-        this.workDirection = workDirection;
-    }
-
-    public Long getCategoryId() {
-        return categoryId;
-    }
-
-    public void setCategoryId(Long categoryId) {
-        this.categoryId = categoryId;
-    }
-
-    public String getCategoryName() {
-        return categoryName;
-    }
-
-    public void setCategoryName(String categoryName) {
-        this.categoryName = categoryName;
-    }
-
-    public String getPicUrl() {
-        return picUrl;
-    }
-
-    public void setPicUrl(String picUrl) {
-        this.picUrl = picUrl;
-    }
-
-    public String getBookName() {
-        return bookName;
-    }
-
-    public void setBookName(String bookName) {
-        this.bookName = bookName;
-    }
-
-    public Long getAuthorId() {
-        return authorId;
-    }
-
-    public void setAuthorId(Long authorId) {
-        this.authorId = authorId;
-    }
-
-    public String getAuthorName() {
-        return authorName;
-    }
-
-    public void setAuthorName(String authorName) {
-        this.authorName = authorName;
-    }
-
-    public String getBookDesc() {
-        return bookDesc;
-    }
-
-    public void setBookDesc(String bookDesc) {
-        this.bookDesc = bookDesc;
-    }
-
-    public Byte getScore() {
-        return score;
-    }
-
-    public void setScore(Byte score) {
-        this.score = score;
-    }
-
-    public Byte getBookStatus() {
-        return bookStatus;
-    }
-
-    public void setBookStatus(Byte bookStatus) {
-        this.bookStatus = bookStatus;
-    }
-
-    public Long getVisitCount() {
-        return visitCount;
-    }
-
-    public void setVisitCount(Long visitCount) {
-        this.visitCount = visitCount;
-    }
-
-    public Integer getWordCount() {
-        return wordCount;
-    }
-
-    public void setWordCount(Integer wordCount) {
-        this.wordCount = wordCount;
-    }
-
-    public Integer getCommentCount() {
-        return commentCount;
-    }
-
-    public void setCommentCount(Integer commentCount) {
-        this.commentCount = commentCount;
-    }
-
-    public Long getLastChapterId() {
-        return lastChapterId;
-    }
-
-    public void setLastChapterId(Long lastChapterId) {
-        this.lastChapterId = lastChapterId;
-    }
-
-    public String getLastChapterName() {
-        return lastChapterName;
-    }
-
-    public void setLastChapterName(String lastChapterName) {
-        this.lastChapterName = lastChapterName;
-    }
-
-    public LocalDateTime getLastChapterUpdateTime() {
-        return lastChapterUpdateTime;
-    }
-
-    public void setLastChapterUpdateTime(LocalDateTime lastChapterUpdateTime) {
-        this.lastChapterUpdateTime = lastChapterUpdateTime;
-    }
-
-    public Byte getIsVip() {
-        return isVip;
-    }
-
-    public void setIsVip(Byte isVip) {
-        this.isVip = isVip;
-    }
-
-    public LocalDateTime getCreateTime() {
-        return createTime;
-    }
-
-    public void setCreateTime(LocalDateTime createTime) {
-        this.createTime = createTime;
-    }
-
-    public LocalDateTime getUpdateTime() {
-        return updateTime;
-    }
-
-    public void setUpdateTime(LocalDateTime updateTime) {
-        this.updateTime = updateTime;
-    }
-
-    public String getCategoryNamecopy() {
-        return categoryNamecopy;
-    }
-
-    public void setCategoryNamecopy(String categoryNamecopy) {
-        this.categoryNamecopy = categoryNamecopy;
-    }
 
-    @Override
-    public String toString() {
-        return "BookInfo{" +
-            "id = " + id +
-            ", workDirection = " + workDirection +
-            ", categoryId = " + categoryId +
-            ", categoryName = " + categoryName +
-            ", picUrl = " + picUrl +
-            ", bookName = " + bookName +
-            ", authorId = " + authorId +
-            ", authorName = " + authorName +
-            ", bookDesc = " + bookDesc +
-            ", score = " + score +
-            ", bookStatus = " + bookStatus +
-            ", visitCount = " + visitCount +
-            ", wordCount = " + wordCount +
-            ", commentCount = " + commentCount +
-            ", lastChapterId = " + lastChapterId +
-            ", lastChapterName = " + lastChapterName +
-            ", lastChapterUpdateTime = " + lastChapterUpdateTime +
-            ", isVip = " + isVip +
-            ", createTime = " + createTime +
-            ", updateTime = " + updateTime +
-            ", categoryNamecopy = " + categoryNamecopy +
-        "}";
-    }
 }

+ 37 - 0
novel-demo/src/main/resources/application-dev.yml

@@ -0,0 +1,37 @@
+novel:
+  # 跨域配置
+  cors:
+    # 允许跨域的域名
+    allow-origins:
+      - http://localhost:1024
+      # - http://localhost:8080
+  jwt:
+    secret: E66559580A1ADF48CDD928516062F12E
+
+server:
+  port: 8888
+# server.port=8888
+
+spring:
+  application:
+    name: novel-demo
+  datasource:
+#    url: jdbc:mysql://localhost:3306/novel-cloud?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai
+    url: jdbc:mysql://10.211.55.14:3306/novel?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai
+    username: root
+#    password: root123456
+    password: 123456
+  jackson:
+    generator:
+      # JSON 序列化时,将所有 Number 类型的属性都转为 String 类型返回,避免前端数据精度丢失的问题。
+      # 由于 Javascript 标准规定所有数字处理都应使用 64 位 IEEE 754 浮点值完成,
+      # 结果是某些 64 位整数值无法准确表示(尾数只有 51 位宽)
+      write-numbers-as-strings: true
+  data:
+    redis:
+#      host: localhost
+      host: 10.211.55.14
+      port: 6379
+#      password:
+      password: 123456
+      database: 1

+ 1 - 1
novel-demo/src/main/resources/application.yml

@@ -16,9 +16,9 @@ spring:
   application:
     name: novel-demo
   datasource:
-    password: root123456
     url: jdbc:mysql://localhost:3306/novel-cloud?useUnicode=true&characterEncoding=utf-8&allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=Asia/Shanghai
     username: root
+    password: root123456
   jackson:
     generator:
       # JSON 序列化时,将所有 Number 类型的属性都转为 String 类型返回,避免前端数据精度丢失的问题。