ソースコードで分析すると(0)――プロジェクト構造

20384 ワード

ファイル構造
com.ruoyi     
├── common            //    
│       └── annotation                    //      
│       └── config                        //     
│       └── constant                      //     
│       └── core                          //     
│       └── enums                         //     
│       └── exception                     //     
│       └── json                          // JSON    
│       └── utils                         //      
│       └── xss                           // XSS    
├── framework         //     
│       └── aspectj                       //     
│       └── config                        //     
│       └── datasource                    //     
│       └── manager                       //     
│       └── shiro                         //     
│       └── util                          //     
│       └── web                           //     
├── ruoyi-generator   //     (   )
├── ruoyi-quartz      //     (   )
├── ruoyi-system      //     
├── ruoyi-admin       //     
├── ruoyi-xxxxxx      //     

プロファイル
汎用構成application.yml
#       
ruoyi:
  #   
  name: RuoYi
  #   
  version: 4.2.0
  #     
  copyrightYear: 2019
  #       
  demoEnabled: true
  #        ( Windows  D:/ruoyi/uploadPath,Linux   /home/ruoyi/uploadPath)
  profile: D:/ruoyi/uploadPath
  #   ip    
  addressEnabled: true

#       
server:
  #     HTTP  ,   80
  port: 80
  servlet:
    #        
    context-path: /
  tomcat:
    # tomcat URI  
    uri-encoding: UTF-8
    # tomcat     ,   200
    max-threads: 800
    # Tomcat         ,   25
    min-spare-threads: 30
 
#     
logging:
  level:
    com.ruoyi: debug
    org.springframework: warn

#     
user:
  password:
    #     {maxRetryCount}   10  
    maxRetryCount: 5

# Spring  
spring:
  #     
  thymeleaf:
    mode: HTML
    encoding: utf-8
    #     
    cache: false
  #     
  messages:
    #          
    basename: static/i18n/messages
  jackson:
    time-zone: GMT+8
    date-format: yyyy-MM-dd HH:mm:ss
  profiles: 
    active: druid
  #     
  servlet:
     multipart:
       #       
       max-file-size:  10MB
       #           
       max-request-size:  20MB
  #     
  devtools:
    restart:
      #      
      enabled: true

# MyBatis
mybatis:
    #        
    typeAliasesPackage: com.ruoyi.project.**.domain
    #   mapper   ,     mapper.xml    
    mapperLocations: classpath:mybatis/**/*Mapper.xml
    #          
    configLocation: classpath:mybatis/mybatis-config.xml

# PageHelper    
pagehelper: 
  helperDialect: mysql
  reasonable: true
  supportMethodsArguments: true
  params: count=countSql 

# Shiro
shiro:
  user:
    #     
    loginUrl: /login
    #         
    unauthorizedUrl: /unauth
    #     
    indexUrl: /index
    #      
    captchaEnabled: true
    #       math      char   
    captchaType: math
  cookie:
    #   Cookie       ,        
    domain: 
    #   cookie       
    path: /
    #   HttpOnly  
    httpOnly: true
    #   Cookie     ,    
    maxAge: 30
  session:
    # Session    ,-1      (  30  )
    expireTime: 30
    #   session       (  1  )
    dbSyncPeriod: 1
    #         session    ,    10  
    validationInterval: 10
    #           ,  2                    (  -1   )
    maxSession: -1
    #        /       ,           
    kickoutAfter: false

#   XSS  
xss: 
  #     
  enabled: true
  #     (       )
  excludes: /system/notice/*
  #     
  urlPatterns: /system/*,/monitor/*,/tool/*

#     
gen: 
  #   
  author: ruoyi
  #         system              system monitor tool
  packageName: com.ruoyi.project.system
  #        ,   true
  autoRemovePre: true
  #    (           ,       )
  tablePrefix: sys_

データソース構成application-druid.yml
#      
spring:
    datasource:
        type: com.alibaba.druid.pool.DruidDataSource
        driverClassName: com.mysql.cj.jdbc.Driver
        druid:
            #      
            master:
                url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
                username: root
                password: password
            #      
            slave:
                #       /    
                enabled: false
                url: 
                username: 
                password: 
            #      
            initialSize: 5
            #        
            minIdle: 10
            #        
            maxActive: 20
            #              
            maxWait: 60000
            #              ,           ,     
            timeBetweenEvictionRunsMillis: 60000
            #                 ,     
            minEvictableIdleTimeMillis: 300000
            #                 ,     
            maxEvictableIdleTimeMillis: 900000
            #           
            validationQuery: SELECT 1 FROM DUAL
            testWhileIdle: true
            testOnBorrow: false
            testOnReturn: false
            webStatFilter: 
                enabled: true
            statViewServlet:
                enabled: true
                #      ,         
                allow:
                url-pattern: /monitor/druid/*
            filter:
                stat:
                    enabled: true
                    #  SQL  
                    log-slow-sql: true
                    slow-sql-millis: 1000
                    merge-sql: true
                wall:
                    config:
                        multi-statement-allow: true

コード生成構成generator.yml
#     
gen: 
  #   
  author: ruoyi
  #         system              system monitor tool
  packageName: com.ruoyi.system
  #        ,   true
  autoRemovePre: true
  #    (         )
  tablePrefix: sys_

コアテクノロジ
SpringBootフレームワーク
Shiro安全制御
Thymeleafテンプレートエンジン