# ===================================================================
# Spring Boot configuration.
#
# This configuration will be overridden by the Spring profile you use,
# for example application-dev.yml if you use the "dev" profile.
#
# More information on profiles: https://www.jhipster.tech/profiles/
# More information on configuration properties: https://www.jhipster.tech/common-application-properties/
# ===================================================================

# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================

management:
    endpoints:
        web:
            base-path: /management
            exposure:
                include: ["configprops", "env", "health", "info", "threaddump", "logfile" ]
    endpoint:
        health:
            show-details: when-authorized
    info:
        git:
            mode: full
    health:
        mail:
            enabled: false # When using the MailService, configure an SMTP server and set this to true
    metrics:
        enabled: false # http://micrometer.io/ is disabled by default, as we use http://metrics.dropwizard.io/ instead

spring:
    autoconfigure:
        exclude: org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration,org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchDataAutoConfiguration
    application:
        name: tpf
    profiles:
        # The commented value for `active` can be replaced with valid Spring profiles to load.
        # Otherwise, it will be filled in by gradle when building the WAR file
        # Either way, it can be overridden by `--spring.profiles.active` value passed in the commandline or `-Dspring.profiles.active` set in `JAVA_OPTS`
        active: #spring.profiles.active#
    jpa:
        open-in-view: false
        properties:
            hibernate.jdbc.time_zone: UTC
            hibernate.enable_lazy_load_no_trans: true
        hibernate:
            ddl-auto: none
            naming:
                physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
                implicit-strategy: org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
    messages:
        basename: i18n/messages
    mvc:
        favicon:
            enabled: false
    thymeleaf:
        mode: HTML
    jackson:
        serialization:
            WRITE_DATES_AS_TIMESTAMPS: false

server:
    servlet:
        session:
            cookie:
                http-only: true

# Properties to be exposed on the /info management endpoint
info:
    # Comma separated list of profiles that will trigger the ribbon to show
    display-ribbon-on-profiles: "dev"

# ===================================================================
# JHipster specific properties
#
# Full reference is available at: https://www.jhipster.tech/common-application-properties/
# ===================================================================

jhipster:
    async:
        core-pool-size: 2
        max-pool-size: 50
        queue-capacity: 10000
    # By default CORS is disabled. Uncomment to enable.
    #cors:
        #allowed-origins: "*"
        #allowed-methods: "*"
        #allowed-headers: "*"
        #exposed-headers: "Authorization,Link,X-Total-Count"
        #allow-credentials: true
        #max-age: 1800
    mail:
        from: tpf@localhost
    swagger:
        default-include-pattern: /api/.*
        title: tpf API
        description: tpf API documentation
        version: 0.0.1
        terms-of-service-url:
        contact-name:
        contact-url:
        contact-email:
        license:
        license-url:

# ===================================================================
# Application specific properties
# Add your own application properties here, see the ApplicationProperties class
# to have type-safe configuration, like in the JHipsterProperties above
#
# More documentation is available at:
# https://www.jhipster.tech/common-application-properties/
# ===================================================================

# application:
app:
    import:
        giong:
            storage: ""
        vattu:
            storage: ""
    upload:
        upload-images: ./upload

casbin:
    project : tpf
    #Whether to enable Casbin, it is enabled by default.
    enableCasbin: true
    #Whether to use thread-synchronized Enforcer, default false
    useSyncedEnforcer: false
    #Whether to enable automatic policy saving, if the adapter supports this function, it is enabled by default.
    autoSave: true
    #Storage type [file, jdbc], currently supported jdbc database [mysql (mariadb), h2, oracle, postgresql, db2]
    #Welcome to write and submit the jdbc adapter you are using, see: org.casbin.adapter.OracleAdapter
    #The jdbc adapter will actively look for the data source information you configured in spring.datasource
    #Default use jdbc, and use the built-in h2 database for memory storage
    storeType: jdbc
    #Data source initialization policy [create (automatically create data table, no longer initialized if created), never (always do not initialize)]
    initializeSchema: create
    #Local model configuration file address, the default reading location: classpath: casbin/model.conf
    model: classpath:casbin/model.conf
    #If the model configuration file is not found in the default location and casbin.model is not set correctly, the built-in default rbac model is used, which takes effect by default.
    useDefaultModelIfModelNotSetting: true
    #Local policy configuration file address, the default reading location: classpath: casbin/policy.csv
    #If the configuration file is not found in the default location, an exception will be thrown.
    #This configuration item takes effect only when casbin.storeType is set to file.
    policy: classpath:casbin/policy.csv
    #Whether to enable the CasbinWatcher mechanism, the default is not enabled.
    #If the mechanism is enabled, casbin.storeType must be jdbc, otherwise the configuration is invalid.
    enableWatcher: false
    #CasbinWatcher notification mode, defaults to use Redis for notification synchronization, temporarily only supports Redis
    #After opening Watcher, you need to manually add spring-boot-starter-data-redis dependency.
    watcherType: redis
    exception:
        ... See Schedule A for exception settings.
springdoc:
    api-docs:
        path: /smf
