Commit 71126ae0 authored by 高洋's avatar 高洋

Track 20 files into repository.

- untracked .gitignore
- removed assets/后端开发/.gitignore
- removed assets/后端开发/activiti-helper.md
- removed assets/后端开发/activiti.md
- removed assets/后端开发/activiti_demo.md
- removed assets/后端开发/activiti_editor_helper.md
- removed assets/后端开发/deployment.md
- removed assets/后端开发/RabbitMq消息队列.md
- removed assets/后端开发/README.md
- removed assets/后端开发/redis.md
- removed sso-describe.md
- untracked 后端开发/activiti-helper.md
- untracked 后端开发/activiti.md
- untracked 后端开发/activiti_demo.md
- untracked 后端开发/activiti_editor_helper.md
- untracked 后端开发/deployment.md
- untracked 后端开发/RabbitMq消息队列.md
- untracked 后端开发/README.md
- untracked 后端开发/redis.md
- modified 融租易开发手册.md

Auto commit by GitBook Editor
parent dff7da34
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
_book/
book.pdf
book.epub
book.mobi
# Logs
logs
*.log
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directory
# Deployed apps should consider commenting this line out:
# see https://npmjs.org/doc/faq.html#Should-I-check-my-node_modules-folder-into-git
node_modules
_book/
book.pdf
book.epub
book.mobi
# 单点登录
融租易目前支持单点登录成功后,可以跳转至登录前的URL。
> 注意系统管理-系统配置页面的配置项---登录成功跳转URL。默认设置为/index,则可以自动跳转至登录前的URL,如果改为自定义的其他页面,则会带上?targetUrl=xxx参数先跳转至系统配置的URL,可自行处理跳转。
可以配置CAS和标准登录并存,默认登录页面为SSO登录页面,访问/login,则可以进入标准登录页面。可以参照如下配置:
修改spring/casSecurity.xml
1.添加用于标准登录的相关bean
```xml
<beans:bean id="loginFailureHandler" class="com.hand.hap.security.LoginFailureHandler"/>
<beans:bean id="captchaVerifierFilter" class="com.hand.hap.security.CaptchaVerifierFilter"> <beans:property name="captchaField" value="verifiCode"/></beans:bean>
```
2.修改认证配置
```xml
<!-- CAS 认证配置 -->
<http entry-point-ref="casEntryPoint" access-decision-manager-ref="accessDecisionManager" >
<csrf disabled="true"/>
<intercept-url pattern="/resources/**" access="permitAll" />
<intercept-url pattern="/lib/**" access="permitAll" />
<intercept-url pattern="/common/**" access="permitAll" />
<intercept-url pattern="/login" access="permitAll" /> <intercept-url pattern="/verifiCode" access="permitAll" />
<intercept-url pattern="/login.html" access="permitAll" />
<intercept-url pattern="/**" access="hasRole('ROLE_USER')" /> <form-login login-page='/login' authentication-success-handler-ref="successHandler" authentication-failure-handler-ref="loginFailureHandler"/>
<!-- 验证码拦截器 -->
<custom-filter ref="captchaVerifierFilter" before="FORM_LOGIN_FILTER"/> <custom-filter ref="requestSingleLogoutFilter" before="LOGOUT_FILTER"/>
<custom-filter position="CAS_FILTER" ref="casFilter" />
<custom-filter ref="singleLogoutFilter" before="CAS_FILTER"/>
<headers defaults-disabled="true">
<cache-control/>
</headers>
</http>
```
3.添加authentication-provider
```xml
<authentication-manager alias="authenticationManager">
<authentication-provider ref="casAuthenticationProvider"/>
<authentication-provider user-service-ref="customUserDetailsService">
<password-encoder ref="passwordManager"/>
</authentication-provider>
</authentication-manager>
```
# 部署
# tomcat
<a href="#tomcat"></a>
### 1. 关闭 eclipse server `Auto Reload` 特性
* 禁用默认值
<img src="/assets/disable_autoreload_all.png" width="50%"/>
* 单独禁用项
<img src="/assets/disable_autoreload_1.png" width="50%"/>
* 建议关闭 jar 扫描, 提高启动速度, 减少内存占用 , 修改 `catalina.properties `
```properties
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar
```
### 2. 内存设置
* Linux 修改 `catalina.sh` ,开始处添加
```bash
JAVA_OPTS='-Xms512m -Xmx2048m'
```
* Windows 修改 `catalina.bat`
```bash
set JAVA_OPTS=-Xms512m -Xmx2048m
```
### 3. 启用远程 JMX 连接
修改 catalina.sh , 搜索 `[ "$1" = "start" ]` , 在下方添加
```bash
JAVA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=1099 \
-Djava.rmi.server.hostname=192.168.1.111 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS"
```
> linux 系统可以用 `` `hostname -i` `` 获取 ip
# Weblogic
<a href="#weblogic"></a>
weblogic 上的部署有些特殊,主要注意以下几点:
> **以下设置仅仅针对 weblogic 12 版本,其他版本可能存在通配符等问题**
### 1. JNDI 数据源
weblogic 上定义好数据源后,在 `config.properties` 中需要修改 jndi 的名字
```properties
db.jndiName=hap_dev
```
> tomcat 中是 java:comp/env/jdbc/hap_dev,这点不一样
### 2. 新增 weblogic.xml
在 WEB-INF 目录下新增 weblogic.xml
```bash
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
<container-descriptor>
<!--优先加载应用下的jar包,解决jar包冲突问题-->
<!--具体jar包冲突问题,具体解决-->
<prefer-application-packages>
<package-name>org.springframework.*</package-name>
<package-name>org.hibernate.*</package-name>
<package-name>javax.validation.*</package-name>
<package-name>javax.validation.spi.*</package-name>
<package-name>org.slf4j.*</package-name>
<package-name>com.fasterxml.*</package-name>
</prefer-application-packages>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
</weblogic-web-app>
```
### 3. weblogic部署异常解决方案
weblogic选择要部署的war包,若出现_wl_cls_gen.jar!这样的日志异常,可将war包,直接解压,进行部署。
上述 3 点在部署的时候请留意。
# 部署
# tomcat
<a href="#tomcat"></a>
### 1. 关闭 eclipse server `Auto Reload` 特性
* 禁用默认值
<img src="/assets/disable_autoreload_all.png" width="50%"/>
* 单独禁用项
<img src="/assets/disable_autoreload_1.png" width="50%"/>
* 建议关闭 jar 扫描, 提高启动速度, 减少内存占用 , 修改 `catalina.properties `
```properties
tomcat.util.scan.StandardJarScanFilter.jarsToSkip=*.jar
```
### 2. 内存设置
* Linux 修改 `catalina.sh` ,开始处添加
```bash
JAVA_OPTS='-Xms512m -Xmx2048m'
```
* Windows 修改 `catalina.bat`
```bash
set JAVA_OPTS=-Xms512m -Xmx2048m
```
### 3. 启用远程 JMX 连接
修改 catalina.sh , 搜索 `[ "$1" = "start" ]` , 在下方添加
```bash
JAVA_OPTS="-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=1099 \
-Djava.rmi.server.hostname=192.168.1.111 \
-Dcom.sun.management.jmxremote.ssl=false \
-Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS"
```
> linux 系统可以用 `` `hostname -i` `` 获取 ip
# Weblogic
<a href="#weblogic"></a>
weblogic 上的部署有些特殊,主要注意以下几点:
> **以下设置仅仅针对 weblogic 12 版本,其他版本可能存在通配符等问题**
### 1. JNDI 数据源
weblogic 上定义好数据源后,在 `config.properties` 中需要修改 jndi 的名字
```properties
db.jndiName=hap_dev
```
> tomcat 中是 java:comp/env/jdbc/hap_dev,这点不一样
### 2. 新增 weblogic.xml
在 WEB-INF 目录下新增 weblogic.xml
```bash
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app>
<container-descriptor>
<!--优先加载应用下的jar包,解决jar包冲突问题-->
<!--具体jar包冲突问题,具体解决-->
<prefer-application-packages>
<package-name>org.springframework.*</package-name>
<package-name>org.hibernate.*</package-name>
<package-name>javax.validation.*</package-name>
<package-name>javax.validation.spi.*</package-name>
<package-name>org.slf4j.*</package-name>
<package-name>com.fasterxml.*</package-name>
</prefer-application-packages>
<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
</container-descriptor>
</weblogic-web-app>
```
### 3. weblogic部署异常解决方案
weblogic选择要部署的war包,若出现_wl_cls_gen.jar!这样的日志异常,可将war包,直接解压,进行部署。
上述 3 点在部署的时候请留意。
# 融租易开发手册
* [GitBook使用](/gitbook.md)
---
* I. 开发环境准备
* [1.1 Git 使用](/git-guide.md "git指令")
* [1.2 Maven 使用](/maven.md "maven使用")
* [1.3 开发环境搭建](/project-create.md)
* [1.4 更新项目的HEL依赖版本](/project-update.md)
* [1.5 Liquibase](/liquibase-use.md)
* II. 项目开发规范
* [2.1 项目开发规范](/codeStyle.md#backEndDev)
* [2.2 编码规范](/codeStyle.md#backEndName)
* 2.3 Checkstyle
* III. 后端开发
* [3.1 单点登录](/sso-describe.md)
* IV. 前端JavaScript开发
* [4.1 前端开发说明 \(1.0\)](/front-kendoui.md)
* [4.2 字段级通用方法](/common-field-javascript.md)
* [4.3 窗口级通用方法](/common-window-javascript.md)
* [4.4 锁屏和解屏通用方法](/common-mask-javascript.md)
* V. 前端UI开发
* [5.1 hlsCombobox(下拉框)](/前端组件/hlsCombobox.md)
* [5.2 hlsDataSource](/前端组件/hlsDataSource.md)
* [5.3 hlsMaskedTextBox](/前端组件/hlsMaskedTextBox.md)
* [5.4 hlsPage](/前端组件/hlsPage.md)
* [5.5 hlsTextArea](/前端组件/hlsTextArea.md)
* [5.6 hlsTlEdit](/前端组件/hlsTlEdit.md)
* [5.7 hlsDatePicker](/前端组件/hlsDatePicker.md)
* [5.8 hlsDateTimePicker](/前端组件/HlsDateTimePicker.md)
* [5.9 hlsLov](/前端组件/HlsLov.md)
* [5.10 hlsToolBar](/前端组件/HlsToolBar.md)
* [5.11 TabStrip](/前端组件/TabStrip.md)
* [5.12 hlsForm](/前端组件/hlsForm.md)
* [5.13 hlsCombobox](/前端组件/HlsCombobox.md)
* [5.14 hlsCheckBox](/前端组件/HlsCheckBox.md)
* [5.15 Grid](/前端组件/Grid.md)
* [5.16 DataSource](/前端组件/DataSource.md)
* [5.17 hlsGridBox](/前端组件/hlsGridBox.md)
* [5.18 NumericTextBx](/前端组件/NumericTextBox.md)
* [5.19 HlsNavigationBar](/前端组件/HlsNavigationBar.md)
* VI. 框架功能描述
* [6.1 计划任务](/框架功能描述/计划任务.md)
* [6.2 RabbitMq消息队列](/后端开发/RabbitMq消息队列.md)
* [6.3 应用服务部署(tomcat/weblogic)](/框架功能描述/deployment.md)
* [6.4 合同文本生成](/docx4j.md)
# 融租易开发手册
* [GitBook使用](/gitbook.md)
---
* I. 开发环境准备
* [1.1 Git 使用](/git-guide.md "git指令")
* [1.2 Maven 使用](/maven.md "maven使用")
* [1.3 开发环境搭建](/project-create.md)
* [1.4 更新项目的HEL依赖版本](/project-update.md)
* [1.5 Liquibase](/liquibase-use.md)
* II. 项目开发规范
* [2.1 项目开发规范](/codeStyle.md#backEndDev)
* [2.2 编码规范](/codeStyle.md#backEndName)
* 2.3 Checkstyle
* III. 后端开发
* IV. 前端JavaScript开发
* [4.1 前端开发说明 \(1.0\)](/front-kendoui.md)
* [4.2 字段级通用方法](/common-field-javascript.md)
* [4.3 窗口级通用方法](/common-window-javascript.md)
* [4.4 锁屏和解屏通用方法](/common-mask-javascript.md)
* V. 前端UI开发
* [5.1 hlsCombobox(下拉框)](/前端组件/hlsCombobox.md)
* [5.2 hlsDataSource](/前端组件/hlsDataSource.md)
* [5.3 hlsMaskedTextBox](/前端组件/hlsMaskedTextBox.md)
* [5.4 hlsPage](/前端组件/hlsPage.md)
* [5.5 hlsTextArea](/前端组件/hlsTextArea.md)
* [5.6 hlsTlEdit](/前端组件/hlsTlEdit.md)
* [5.7 hlsDatePicker](/前端组件/hlsDatePicker.md)
* [5.8 hlsDateTimePicker](/前端组件/HlsDateTimePicker.md)
* [5.9 hlsLov](/前端组件/HlsLov.md)
* [5.10 hlsToolBar](/前端组件/HlsToolBar.md)
* [5.11 TabStrip](/前端组件/TabStrip.md)
* [5.12 hlsForm](/前端组件/hlsForm.md)
* [5.13 hlsCombobox](/前端组件/HlsCombobox.md)
* [5.14 hlsCheckBox](/前端组件/HlsCheckBox.md)
* [5.15 Grid](/前端组件/Grid.md)
* [5.16 DataSource](/前端组件/DataSource.md)
* [5.17 hlsGridBox](/前端组件/hlsGridBox.md)
* [5.18 NumericTextBx](/前端组件/NumericTextBox.md)
* [5.19 HlsNavigationBar](/前端组件/HlsNavigationBar.md)
* VI. 框架功能描述
* [6.1 计划任务](/框架功能描述/计划任务.md)
* [6.2 RabbitMq消息队列](/后端开发/RabbitMq消息队列.md)
* [6.3 应用服务部署(tomcat/weblogic)](/框架功能描述/deployment.md)
* [6.4 合同文本生成](/docx4j.md)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment