mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-04 08:26:37 +00:00
上传代码
This commit is contained in:
19
novel-common/src/main/resources/application-common-dev.yml
Normal file
19
novel-common/src/main/resources/application-common-dev.yml
Normal file
@ -0,0 +1,19 @@
|
||||
spring:
|
||||
profiles:
|
||||
include: [common]
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
|
||||
|
||||
pic:
|
||||
save:
|
||||
type: 2 #图片保存方式, 1不保存,使用网络图片 ,2本地保存
|
||||
path: /var/pic #图片保存路径
|
||||
|
||||
|
||||
|
||||
|
17
novel-common/src/main/resources/application-common-test.yml
Normal file
17
novel-common/src/main/resources/application-common-test.yml
Normal file
@ -0,0 +1,17 @@
|
||||
spring:
|
||||
profiles:
|
||||
include: [common]
|
||||
datasource:
|
||||
url: jdbc:mysql://127.0.0.1:3306/novel_biz?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: root
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
|
||||
|
||||
pic:
|
||||
save:
|
||||
type: 2 #图片保存方式, 1不保存,使用网络图片 ,2本地保存
|
||||
path: /var/pic #图片保存路径
|
||||
|
||||
|
||||
|
25
novel-common/src/main/resources/application-common.yml
Normal file
25
novel-common/src/main/resources/application-common.yml
Normal file
@ -0,0 +1,25 @@
|
||||
spring:
|
||||
cache:
|
||||
ehcache:
|
||||
config: classpath:ehcache.xml
|
||||
thymeleaf:
|
||||
mode: LEGACYHTML5 #去除thymeleaf的html严格校验thymeleaf.mode=LEGACYHTML5
|
||||
cache: false # 是否开启模板缓存,默认true,建议在开发时关闭缓存,不然没法看到实时
|
||||
|
||||
# 将所有数字转为 String 类型返回,避免前端数据精度丢失的问题
|
||||
jackson:
|
||||
generator:
|
||||
write-numbers-as-strings: true
|
||||
|
||||
|
||||
mybatis:
|
||||
configuration:
|
||||
#自动将数据库带下划线的表字段值映射到Java类的驼峰字段上
|
||||
map-underscore-to-camel-case: true
|
||||
mapper-locations: classpath*:mybatis/mapping/*.xml
|
||||
type-aliases-package: com.java2nb.novel.entity
|
||||
|
||||
logging:
|
||||
config: classpath:logback-boot.xml
|
||||
|
||||
|
5
novel-common/src/main/resources/messages.properties
Normal file
5
novel-common/src/main/resources/messages.properties
Normal file
@ -0,0 +1,5 @@
|
||||
#网站配置
|
||||
#网站名
|
||||
website.name=小说精品屋
|
||||
#PC站网站域名
|
||||
website.domain=www.java2nb.com
|
52
novel-common/src/main/resources/mybatis/generatorConfig.xml
Normal file
52
novel-common/src/main/resources/mybatis/generatorConfig.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
|
||||
<generatorConfiguration>
|
||||
<!--Mybatis Generator目前有5种运行模式,分别为:MyBatis3DynamicSql、MyBatis3Kotlin、MyBatis3、MyBatis3Simple、MyBatis3DynamicSqlV1。-->
|
||||
<context id="springboot-base" targetRuntime="MyBatis3DynamicSql">
|
||||
<commentGenerator>
|
||||
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
|
||||
<property name="suppressAllComments" value="true" />
|
||||
</commentGenerator>
|
||||
<jdbcConnection
|
||||
connectionURL="jdbc:mysql://127.0.0.1:3306/novel_biz?tinyInt1isBit=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true"
|
||||
driverClass="com.mysql.jdbc.Driver" password=""
|
||||
userId="root" />
|
||||
|
||||
<!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer, 为 true时把JDBC DECIMAL
|
||||
和 NUMERIC 类型解析为java.math.BigDecimal -->
|
||||
<javaTypeResolver>
|
||||
<property name="forceBigDecimals" value="false" />
|
||||
</javaTypeResolver>
|
||||
|
||||
<!-- targetProject:生成PO类的位置 -->
|
||||
<javaModelGenerator
|
||||
targetPackage="com.java2nb.novel.entity"
|
||||
targetProject="novel-common/src/main/java">
|
||||
<!-- enableSubPackages:是否让schema作为包的后缀 -->
|
||||
<property name="enableSubPackages" value="false" />
|
||||
<!-- 从数据库返回的值被清理前后的空格 -->
|
||||
<property name="trimStrings" value="true" />
|
||||
</javaModelGenerator>
|
||||
|
||||
<!-- targetProject:mapper映射文件生成的位置 -->
|
||||
<sqlMapGenerator targetPackage="mybatis.mapping"
|
||||
targetProject="novel-common/src/main/resources">
|
||||
<!-- enableSubPackages:是否让schema作为包的后缀 -->
|
||||
<property name="enableSubPackages" value="false" />
|
||||
</sqlMapGenerator>
|
||||
|
||||
<!-- targetPackage:mapper接口生成的位置 -->
|
||||
<javaClientGenerator
|
||||
targetPackage="com.java2nb.novel.mapper"
|
||||
targetProject="novel-common/src/main/java" type="XMLMAPPER">
|
||||
<!-- enableSubPackages:是否让schema作为包的后缀 -->
|
||||
<property name="enableSubPackages" value="false" />
|
||||
</javaClientGenerator>
|
||||
|
||||
<!--生成全部表tableName设为%-->
|
||||
<table tableName="crawl_source" domainObjectName="CrawlSource"/>
|
||||
|
||||
<!-- 指定数据库表 -->
|
||||
<!--<table schema="jly" tableName="job_position" domainObjectName="JobPositionTest"/>-->
|
||||
</context>
|
||||
</generatorConfiguration>
|
Reference in New Issue
Block a user