RealTimeClassRoom修改的文件
将服务器环境搭建好之后需要修改以下几个文件:
property.properties
123456789101112131415161718//mysql链接,如果是远程数据库,修改为远程数据库的链接和端口mysql.url=jdbc\:mysql\://127.0.0.1\:3307/zzkt_ofbiz?&useUnicode\=true&characterEncoding\=utf-8&autoReconnect\=truemysql.drivername=com.mysql.jdbc.Drivermysql.username=rootmysql.password=****mysql2.url=jdbc\:mysql\://127.0.0.1\:3307/ofbiz?&useUnicode\=true&characterEncoding\=utf-8&autoReconnect\=truemysql2.username=rootmysql2.password=****//mongo的url也需要更改,用远程的也可以mongo.url=115.28.233.32mongo.port=27017mongo.dbname=RealTimeClassUseRecordCollectionName=UserOPRecordmongo.username=rootmongo.password=123456mongo.maxconn=5000mongo.minconn=100class.aheadoftime=30platform.properties
12345678//修改为服务器所在域名加上端口号DOMAIN=http\://sso.zzkt.com\:8080//不用修改PLAT_APP_NAME=eduportal///不用修改PLAT_PHOTO_NAME=app///修改为服务器所在域名CERTIFICATION_SERVER=sso.zzkt.comaodianyun.properties
1234567//修改为自己奥点运平台的参数AODIANYUN_LIST_URL=http\://openapi.aodianyun.com/v2/VOD.GetVodListACCESS_ID=ACCESS_KEY=APPNAME=ssktPUBLISH_URL=PLAY_URL=web.xml
123456789101112131415161718192021222324252627282930313233343536373839404142<filter><filter-name>CASFilter</filter-name><!-- <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class> --><filter-class>cn.edu.pku.ss.casfilter.AuthenticationFilterWithExcludeUrl</filter-class><init-param><param-name>casServerLoginUrl</param-name><param-value>http://sso.zzkt.com:8080/cas/login</param-value><!-- <param-value>http://online.sunhopeww.com:8080/cas/login</param-value> --><!--这里的server是服务端的IP --></init-param><init-param><!--本程序所在的URL --><param-name>serverName</param-name><param-value>http://sso.zzkt.com:8080</param-value><!-- <param-value>http://online.sunhopeww.com:8080</param-value> --></init-param><init-param><param-name>exclusions</param-name><param-value>/register/checkUsername.action,/search/famousCourseSearch.action,/studentUCenter/studentUCenter.action,/teacherUCenter/teacherUCenter.action,/register/doRegister.action,/register/register.action,/index/queryIndex.action,/iframe/queryIframeCourse.action,/courseShow/getCourse.action,/studentCourseManage/chooseCourseForWS.action,/sskt_logout/sskt_logout.action,/courseManage/approveCourse.action,/liveshow/apiLiveShowAction.action,/apicourse/getCourseInforByID.action,/apicourse/getCourseInforByTeacherID.action,/apicourse/getUnderWayCourseInfor.action,/yitiku/loginYiTiKu.action,/apicourse/getCourseListByCatagory.action,/apicourse/getCourseInforByProductID.action,/apiteacher/applyCourseAction.action,/user/getAllClassesInfoByTeacherID.action,/user/getAllStudentInfoByGradeIDAndClassID.action,/user/getAllStudentInfoByTeacherID.action</param-value></init-param></filter><!-- 该过滤器负责对Ticket的校验工作,必须启用它 --><filter><filter-name>CAS Validation Filter</filter-name><filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class><init-param><param-name>casServerUrlPrefix</param-name><param-value>http://sso.zzkt.com:8080/cas</param-value><!-- <param-value>http://online.sunhopeww.com:8080/cas</param-value> --></init-param><init-param><param-name>serverName</param-name><param-value>http://sso.zzkt.com:8080</param-value><!-- <param-value>http://online.sunhopeww.com:8080</param-value> --></init-param></filter><filter-mapping><filter-name>CAS Validation Filter</filter-name><url-pattern>*.action</url-pattern></filter-mapping>webroot/static-new/js/ownjs/course-detail.js
1234567//未登录点击购买课程按钮$("#notLoginPurchase").click(function(){var courseId = $("#courseId").val();alert("请您先登录");window.location.href='http://sso.zzkt.com:8080/cas/login?service=http://sso.zzkt.com:8080/RealTimeClassRoom/courseShow/getCourse.action?courseId='+courseId+'&&pamCasLoginId=1';// window.location.href='http://online.sunhopeww.com:8080/cas/login?service=http://online.sunhopeww.com:8080/RealTimeClassRoom/courseShow/getCourse.action?courseId='+courseId+'&&pamCasLoginId=1';});
CAS要修改的文件
web-inf/depolyerConfigContext.xml
123456789101112<bean id="primaryAuthenticationHandler"class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler"><property name="dataSource" ref="dataSource"></property><property name="sql" value="select password from sskt_user where userId=?"></property><property name="passwordEncoder" ref="passwordEncoder"/></bean><bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><property name="url"><value>jdbc:mysql://127.0.0.1:3307/zzkt_ofbiz</value></property><property name="username"><value>root</value></property><property name="password"><value>mysql123</value></property></bean>/cas/WEB-INF/view/jsp/default/ui/casLogoutView.jsp
12345function doSomeLogout(){//getLabelsGet("http://121.42.149.42:6301/logout");getLabelsGet("http://sso.zzkt.com:8080/RealTimeClassRoom/sskt_logout/sskt_logout.action");//getLabelsGet("http://121.42.149.42:6300/logout");}