├── settings.gradle ├── 1581913776822.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── src └── main │ ├── webapp │ ├── img │ │ ├── login-bg2.png │ │ ├── login-bg3.jpg │ │ └── banner_small.png │ └── login.jsp │ └── resources │ ├── META-INF │ └── persistence.xml │ └── application.properties ├── modules └── sales │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── com │ │ └── mingming │ │ └── sales │ │ ├── db │ │ └── repo │ │ │ └── OrderRepository.java │ │ ├── SalesModule.java │ │ ├── service │ │ ├── OrderService.java │ │ └── OrderServiceImpl.java │ │ └── web │ │ └── OrderController.java │ └── resources │ ├── views │ ├── Customer.xml │ ├── Product.xml │ ├── Menu.xml │ └── Order.xml │ └── domains │ └── Entities.xml ├── README.md ├── .gitignore ├── gradlew.bat └── gradlew /settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ming-sales-demo' 2 | 3 | include "modules:sales" 4 | -------------------------------------------------------------------------------- /1581913776822.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldrev/ep009-axelor-sales-demo/HEAD/1581913776822.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldrev/ep009-axelor-sales-demo/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/webapp/img/login-bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldrev/ep009-axelor-sales-demo/HEAD/src/main/webapp/img/login-bg2.png -------------------------------------------------------------------------------- /src/main/webapp/img/login-bg3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldrev/ep009-axelor-sales-demo/HEAD/src/main/webapp/img/login-bg3.jpg -------------------------------------------------------------------------------- /src/main/webapp/img/banner_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oldrev/ep009-axelor-sales-demo/HEAD/src/main/webapp/img/banner_small.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /modules/sales/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.axelor.app-module' 2 | 3 | axelor { 4 | title "Sales Demo" 5 | 6 | version "0.1.0" 7 | 8 | description """销售演示模块""" 9 | 10 | // 下面的 removable 表示此模块可以卸载 11 | // removable = true 12 | } 13 | 14 | dependencies { 15 | } 16 | -------------------------------------------------------------------------------- /modules/sales/src/main/java/com/mingming/sales/db/repo/OrderRepository.java: -------------------------------------------------------------------------------- 1 | package com.mingming.sales.db.repo; 2 | 3 | import com.mingming.sales.db.Order; 4 | import java.util.Map; 5 | 6 | /** 7 | * 这个 Repo 没什么用,就是演示下怎么自定义数据访问层 8 | */ 9 | public class OrderRepository extends AbstractOrderRepository { 10 | 11 | public String hello() { 12 | return "Hello World"; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /modules/sales/src/main/java/com/mingming/sales/SalesModule.java: -------------------------------------------------------------------------------- 1 | package com.mingming.sales; 2 | 3 | import com.axelor.app.AxelorModule; 4 | import com.mingming.sales.service.OrderService; 5 | import com.mingming.sales.service.OrderServiceImpl; 6 | 7 | public class SalesModule extends AxelorModule { 8 | 9 | @Override 10 | protected void configure() { 11 | bind(OrderService.class).to(OrderServiceImpl.class); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EP009-Demo 2 | 3 | Axelor 平台开发销售管理模块的演示源代码。 4 | 5 | 想要体验此例子加上汉化后的 Axelor 开发平台,可访问:https://github.com/axelor-l10n-cn/ep009-axelor-sales-demo 6 | 7 | 提示:若 Gradle 无法正常安装依赖,需要配置代理服务器或使用国内 Maven 镜像。 8 | 9 | 有问题可加入专业 Axelor 讨论 QQ 群: 10 | 11 | 12 | Axelor 实施开发学习交 13 | 14 | ![进群](1581913776822.png) 15 | -------------------------------------------------------------------------------- /modules/sales/src/main/java/com/mingming/sales/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package com.mingming.sales.service; 2 | 3 | import com.axelor.common.ObjectUtils; 4 | import java.math.BigDecimal; 5 | import java.math.RoundingMode; 6 | import javax.validation.ValidationException; 7 | 8 | import com.mingming.sales.db.Order; 9 | import com.mingming.sales.db.OrderLine; 10 | 11 | /** 12 | * 销售订单的业务逻辑层接口 13 | */ 14 | public interface OrderService { 15 | void validate(Order order); 16 | OrderLine calculateOrderLine(OrderLine line); 17 | Order calculateOrder(Order order); 18 | } 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | build 3 | .gradle 4 | 5 | # Eclispe 6 | bin 7 | .project 8 | .classpath 9 | .settings 10 | .metadata 11 | 12 | # Intellij 13 | out 14 | .idea 15 | *.iml 16 | *.ipr 17 | *.iws 18 | *.iml 19 | atlassian-ide-plugin.xml 20 | 21 | # NetBeans 22 | .nbattrs 23 | 24 | # virtual machine crash logs 25 | hs_err_pid* 26 | 27 | # Backup files 28 | *.sw[nop] 29 | *~ 30 | .#* 31 | [#]*# 32 | 33 | # dotenv or direnv 34 | .env 35 | .envrc 36 | 37 | # Miscellaneous 38 | *.log 39 | .clover 40 | .DS_Store 41 | 42 | # Profiler and heap dumps 43 | *.jps 44 | *.hprof 45 | /.nb-gradle/ 46 | 47 | # JavaScript 48 | node_modules 49 | -------------------------------------------------------------------------------- /modules/sales/src/main/resources/views/Customer.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /modules/sales/src/main/resources/views/Product.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /modules/sales/src/main/resources/views/Menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /modules/sales/src/main/java/com/mingming/sales/service/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.mingming.sales.service; 2 | 3 | import com.axelor.common.ObjectUtils; 4 | import java.math.BigDecimal; 5 | import java.math.RoundingMode; 6 | import javax.validation.ValidationException; 7 | 8 | import com.mingming.sales.db.Order; 9 | import com.mingming.sales.db.OrderLine; 10 | import com.mingming.sales.db.repo.OrderRepository; 11 | import com.mingming.sales.service.OrderService; 12 | import javax.inject.Inject; 13 | 14 | /** 15 | * 销售订单的业务逻辑层接口实现 16 | */ 17 | public class OrderServiceImpl implements OrderService { 18 | 19 | @Inject private OrderRepository _repo; 20 | 21 | public void validate(Order order) { 22 | if (order != null 23 | && order.getConfirmTime() != null 24 | && order.getConfirmTime().isBefore(order.getOrderTime())) { 25 | throw new ValidationException("无效的销售单日期"); 26 | } 27 | } 28 | 29 | public OrderLine calculateOrderLine(OrderLine line) { 30 | BigDecimal subtotal = line.getUnitPrice().multiply(line.getQuantity()); 31 | line.setSubtotalAmount(subtotal); 32 | return line; 33 | } 34 | 35 | public Order calculateOrder(Order order) { 36 | BigDecimal amount = BigDecimal.ZERO; 37 | if (!ObjectUtils.isEmpty(order.getLines())) { 38 | for (OrderLine line : order.getLines()) { 39 | // 每行明细的小计等于单价乘以数量 40 | BigDecimal subtotal = line.getUnitPrice().multiply(line.getQuantity()); 41 | // 累加计算总金额 42 | amount = amount.add(subtotal); 43 | } 44 | } 45 | 46 | // 四舍五入保留两位小数 47 | order.setTotalAmount(amount.setScale(2, RoundingMode.HALF_UP)); 48 | return order; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /modules/sales/src/main/java/com/mingming/sales/web/OrderController.java: -------------------------------------------------------------------------------- 1 | package com.mingming.sales.web; 2 | 3 | // 导入系统库 4 | import com.axelor.db.JpaSupport; 5 | import com.axelor.rpc.ActionRequest; 6 | import com.axelor.rpc.ActionResponse; 7 | import com.google.common.collect.Lists; 8 | import java.math.BigDecimal; 9 | import java.math.RoundingMode; 10 | import java.time.LocalDate; 11 | import java.util.HashMap; 12 | import java.util.List; 13 | import java.util.Map; 14 | import javax.inject.Inject; 15 | import javax.persistence.EntityManager; 16 | import javax.persistence.Query; 17 | 18 | // 导入模块库 19 | import com.mingming.sales.db.Order; 20 | import com.mingming.sales.db.OrderStatus; 21 | import com.mingming.sales.service.OrderService; 22 | 23 | public class OrderController extends JpaSupport { 24 | 25 | @Inject private OrderService _service; 26 | 27 | /** 28 | * 此控制器动作用于按下“确认订单”按钮的操作,一般涉及业务逻辑的代码应当放入业务逻辑层中, 29 | * 也就是 OrderService 中 30 | */ 31 | public void onConfirm(ActionRequest request, ActionResponse response) { 32 | 33 | Order order = request.getContext().asType(Order.class); 34 | 35 | response.setReadonly("orderTime", true); 36 | response.setReadonly("confirmTime", true); 37 | 38 | if (order.getConfirmTime() == null) { 39 | response.setValue("confirmTime", LocalDate.now()); 40 | } 41 | 42 | response.setValue("status", OrderStatus.OPEN); 43 | } 44 | 45 | public void calculate(ActionRequest request, ActionResponse response) { 46 | 47 | Order order = request.getContext().asType(Order.class); 48 | order = _service.calculateOrder(order); 49 | 50 | //response.setValue("amount", order.getAmount()); 51 | //response.setValue("taxAmount", order.getTaxAmount()); 52 | response.setValue("totalAmount", order.getTotalAmount()); 53 | } 54 | 55 | } -------------------------------------------------------------------------------- /src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | org.hibernate.jpa.HibernatePersistenceProvider 7 | ENABLE_SELECTIVE 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS="-Xmx64m" 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /modules/sales/src/main/resources/domains/Entities.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /modules/sales/src/main/resources/views/Order.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 116 | <% } %> 117 | 118 | <% } %> 119 | 120 |
121 |
122 |
123 |
124 | 125 | 126 |
127 |
128 | 129 | 130 |
131 | <% if (tenants != null && tenants.size() > 1) { %> 132 |
133 | 134 | 139 |
140 | <% } %> 141 | 146 | 147 |
148 | 151 |
152 |
153 | 154 | 163 | 167 | 168 | 169 |
170 |

<%= copyright %>

171 |
172 | 173 |
174 | 175 | 195 | 196 | 197 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | # Application Information 2 | # ~~~~~ 3 | application.name = Axelor Sales Demo 4 | application.description = Axelor Sales Demo by Uncle Ming Channel 5 | application.version = 0.1.0 6 | 7 | # Author/Company 8 | # ~~~~~ 9 | application.author = Uncle Ming Channel 10 | application.copyright = Copyright (c) {year} Uncle Ming Channel. All Rights Reserved. 11 | 12 | # Header Logo 13 | # ~~~~~ 14 | # Should be 40px in height with transparent background 15 | application.logo = img/banner_small.png 16 | 17 | # Home Website 18 | # ~~~~~ 19 | # Link to be used with header logo 20 | application.home = https://www.youtube.com/channel/UC8nM1uN2Ii9bC0nDAoOQa3g 21 | 22 | # Link to the online help 23 | # ~~~~~ 24 | application.help = https://www.youtube.com/channel/UC8nM1uN2Ii9bC0nDAoOQa3g 25 | 26 | # Application deployment mode 27 | # ~~~~~ 28 | # Set to 'dev' for development mode else 'prod' 29 | application.mode = dev 30 | 31 | # CSS Theme 32 | # ~~~~~ 33 | # Set default CSS theme, for example `blue` 34 | application.theme = 35 | 36 | # Default Locale (language) 37 | # ~~~~~ 38 | # Set default application locale (en, fr, fr_FR, en_US) 39 | application.locale = cn 40 | 41 | # Encryption 42 | # ~~~~~ 43 | # Set encryption password 44 | #encryption.password = MySuperSecretKey 45 | 46 | # Set encryption algorithm (CBC or GCM) 47 | #encryption.algorithm = CBC 48 | 49 | # Database settings 50 | # ~~~~~ 51 | # See hibernate documentation for connection parameters 52 | 53 | # HERE 54 | # PostgreSQL 55 | db.default.driver = org.postgresql.Driver 56 | db.default.ddl = update 57 | db.default.url = jdbc:postgresql://localhost:5432/ming-sales-demo 58 | db.default.user = mingming 59 | db.default.password = mingming 60 | 61 | # MySQL 62 | #db.default.driver = com.mysql.jdbc.Driver 63 | #db.default.ddl = update 64 | #db.default.url = jdbc:mysql://localhost:3306/axelor_demo_dev 65 | #db.default.user = axelor 66 | #db.default.password = 67 | 68 | # Oracle 69 | #db.default.driver = oracle.jdbc.OracleDriver 70 | #db.default.ddl = update 71 | #db.default.url = jdbc:oracle:thin:@localhost:1521:oracle 72 | #db.default.user = axelor 73 | #db.default.password = 74 | 75 | # Date Format 76 | # ~~~~~ 77 | date.format = yyyy/MM/dd/MM 78 | 79 | # Timezone 80 | # ~~~~~ 81 | date.timezone = Asia/Shanghai 82 | 83 | # Session timeout (in minutes) 84 | # ~~~~~ 85 | session.timeout = 60 86 | 87 | # Storage path for upload files (attachments) 88 | # ~~~~~ 89 | # use {user.home} key to save files under user home directory, or 90 | # use absolute path where server user have write permission. 91 | file.upload.dir = {user.home}/.axelor/attachments 92 | 93 | # Upload filename pattern, default is auto where file is save with same name 94 | # in the given upload dir, if file is already there, a count number is 95 | # appended to file name. 96 | # 97 | # This can be overridden by providing custom name pattern, for example: 98 | # 99 | # file.upload.filename.pattern = {year}-{month}/{day}/{name} 100 | # file.upload.filename.pattern = {AA}/{name} 101 | # 102 | # Following placeholders can be used: 103 | # 104 | # {year} - current year 105 | # {month} - current month 106 | # {day} - current day 107 | # {name} - file name 108 | # {A} - first letter from file name 109 | # {AA} - first 2 letter from file name 110 | # {AAA} - first 3 letter from file name 111 | # 112 | #file.upload.filename.pattern = {year}-{month}/{day}/{name} 113 | 114 | # Maximum upload size (in MB) 115 | # ~~~~~ 116 | file.upload.size = 5 117 | 118 | # Whitelist pattern can be used to allow file upload with matching names. 119 | # 120 | # For example: \\.(xml|html|jpg|png|pdf|xsl)$ 121 | # 122 | # Regular expression 123 | # ~~~~~ 124 | #file.upload.whitelist.pattern = 125 | 126 | # Blacklist pattern can be used to block file upload with matching names. 127 | # 128 | # Regular expression 129 | # ~~~~~ 130 | #file.upload.blacklist.pattern = 131 | 132 | # Whitelist content type can be used to allow file upload with matching content. 133 | # 134 | # List of mime-types (plain/text,image/*,video/webm) 135 | # ~~~~~ 136 | #file.upload.whitelist.types = 137 | 138 | # Blacklist content type can be used to block file upload with matching content. 139 | # 140 | # List of mime-types (plain/text,image/*,video/webm) 141 | # ~~~~~ 142 | #file.upload.blacklist.types = 143 | 144 | # The external report design directory 145 | # ~~~~~ 146 | # this directory is searched for the rptdesign files 147 | # (fallbacks to designs provided by modules) 148 | reports.design.dir = {user.home}/.axelor/reports 149 | 150 | # Storage path for report outputs 151 | reports.output.dir = {user.home}/.axelor/reports-gen 152 | 153 | # Data export (csv) encoding 154 | # ~~~~ 155 | # Use Windows-1252, ISO-8859-1 or ISO-8859-15 if targeting ms excel 156 | # (excel does not recognize utf8 encoded csv) 157 | data.export.encoding = UTF-8 158 | 159 | # Storage path for export action 160 | # ~~~~~ 161 | data.export.dir = {user.home}/.axelor/data-export 162 | 163 | # Specify whether to import demo data 164 | # ~~~~~ 165 | data.import.demo-data = true 166 | 167 | # Storage path for templates 168 | # ~~~~~ 169 | template.search.dir = {user.home}/.axelor/templates 170 | 171 | # LDAP Configuration 172 | # ~~~~~ 173 | #ldap.server.url = ldap://localhost:10389 174 | 175 | # can be "simple" or "CRAM-MD5" 176 | ldap.auth.type = simple 177 | 178 | ldap.system.user = uid=admin,ou=system 179 | ldap.system.password = secret 180 | 181 | # group search base 182 | ldap.group.base = ou=groups,dc=example,dc=com 183 | 184 | # if set, create groups on ldap server under ldap.group.base 185 | #ldap.group.object.class = groupOfUniqueNames 186 | 187 | # a template to search groups by user login id 188 | ldap.group.filter = (uniqueMember=uid={0}) 189 | 190 | # user search base 191 | ldap.user.base = ou=users,dc=example,dc=com 192 | 193 | # a template to search user by user login id 194 | ldap.user.filter = (uid={0}) 195 | 196 | # CAS configuration 197 | # ~~~~~ 198 | #auth.cas.server.url.prefix = https://localhost:8443/cas 199 | 200 | # use public accessible url 201 | #auth.cas.service = http://localhost:8080/axelor-demo/cas 202 | 203 | # login url, if not given prepared from server & service url 204 | #auth.cas.login.url = https://localhost:8443/cas/login?service=http://localhost:8080/axelor-demo/cas 205 | 206 | # logout url, if not given prepared from server & service url 207 | #auth.cas.logout.url = https://localhost:8443/cas/logout?service=http://localhost:8080/axelor-demo/ 208 | 209 | # CAS validation protocol (CAS, SAML) 210 | #auth.cas.protocol = SAML 211 | 212 | # the attribute to map to user display name 213 | #auth.cas.attrs.user.name = name 214 | 215 | # the attribute to map to user email 216 | #auth.cas.attrs.user.email = mail 217 | 218 | # Quartz Scheduler 219 | # ~~~~~ 220 | # quartz job scheduler 221 | 222 | # Specify whether to enable quartz scheduler 223 | quartz.enable = false 224 | 225 | # total number of threads in quartz thread pool 226 | # the number of jobs that can run simultaneously 227 | quartz.threadCount = 3 228 | 229 | # SMPT configuration 230 | # ~~~~~ 231 | # SMTP server configuration 232 | #mail.smtp.host = smtp.gmail.com 233 | #mail.smtp.port = 587 234 | #mail.smtp.channel = starttls 235 | #mail.smtp.user = user@gmail.com 236 | #mail.smtp.pass = secret 237 | 238 | # timeout settings 239 | #mail.smtp.timeout = 60000 240 | #mail.smtp.connectionTimeout = 60000 241 | 242 | # IMAP configuration 243 | # ~~~~~ 244 | # IMAP server configuration 245 | # (quartz scheduler should be enabled for fetching stream replies) 246 | #mail.imap.host = imap.gmail.com 247 | #mail.imap.port = 993 248 | #mail.imap.channel = ssl 249 | #mail.imap.user = user@gmail.com 250 | #mail.imap.pass = secret 251 | 252 | # timeout settings 253 | #mail.imap.timeout = 60000 254 | #mail.imap.connectionTimeout = 60000 255 | 256 | # CORS configuration 257 | # ~~~~~ 258 | # CORS settings to allow cross origin requests 259 | 260 | # regular expression to test allowed origin or * to allow all (not recommended) 261 | #cors.allow.origin = * 262 | #cors.allow.credentials = true 263 | #cors.allow.methods = GET,PUT,POST,DELETE,HEAD,OPTIONS 264 | #cors.allow.headers = Origin,Accept,X-Requested-With,Content-Type,Access-Control-Request-Method,Access-Control-Request-Headers 265 | 266 | # View configuration 267 | # ~~~~~ 268 | 269 | # Set to true to enable single view mode 270 | view.single.tab = false 271 | 272 | # Set menu style (left, top, both) 273 | view.menubar.location = both 274 | 275 | # HERE 276 | view.toolbar.titles = true 277 | 278 | # Advance Filter Sharing 279 | # ~~~~~ 280 | # Set to false to hide advance search filter share option, or set to list of 281 | # role names to enable share for those roles only. 282 | #view.adv-search.share = share-filter,can-share-filter 283 | 284 | # Logging 285 | # ~~~~~ 286 | # Custom logback configuration can be provided with `logging.config` property pointing 287 | # to a custom `logback.xml`. In this case, all the logging configuration provided here 288 | # will be ignored. 289 | # 290 | # Following settings can be used to configure logging system automatically. 291 | # 292 | #logging.path = {user.home}/.axelor/logs 293 | #logging.pattern.file = %d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } --- [%t] %-40.40logger{39} : %m%n 294 | #logging.pattern.console = %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n 295 | 296 | # Global logging 297 | logging.level.root = ERROR 298 | 299 | # Axelor logging 300 | 301 | # Log everything. 302 | logging.level.com.axelor = INFO 303 | 304 | # Hibernate logging 305 | 306 | # Log everything. Good for troubleshooting 307 | #logging.level.org.hibernate = INFO 308 | 309 | # Log all SQL DML statements as they are executed 310 | #logging.level.org.hibernate.SQL = DEBUG 311 | #logging.level.org.hibernate.engine.jdbc = DEBUG 312 | 313 | # Log all SQL DDL statements as they are executed 314 | #logging.level.org.hibernate.tool.hbm2ddl = INFO 315 | 316 | # Log all JDBC parameters 317 | #logging.level.org.hibernate.type = ALL 318 | 319 | # Log transactions 320 | #logging.level.org.hibernate.transaction = DEBUG 321 | 322 | # Log L2-Cache 323 | #logging.level.org.hibernate.cache = DEBUG 324 | 325 | # Log JDBC resource acquisition 326 | #logging.level.org.hibernate.jdbc = TRACE 327 | #logging.level.org.hibernate.service.jdbc = TRACE 328 | 329 | # Log connection pooling 330 | #logging.level.com.zaxxer.hikari = INFO 331 | --------------------------------------------------------------------------------