Commit c62c142dcf30cca483a7df4c58fe136b76c4b50a
1 parent
b9f453df
no message
Showing
3 changed files
with
48 additions
and
3 deletions
src/main/java/com/cnlive/mz/live/action/Init.java
0 → 100644
| 1 | +package com.cnlive.mz.live.action; | |
| 2 | + | |
| 3 | +import java.io.IOException; | |
| 4 | + | |
| 5 | +import javax.servlet.ServletConfig; | |
| 6 | +import javax.servlet.ServletException; | |
| 7 | +import javax.servlet.http.HttpServlet; | |
| 8 | +import javax.servlet.http.HttpServletRequest; | |
| 9 | +import javax.servlet.http.HttpServletResponse; | |
| 10 | + | |
| 11 | +import org.smart4j.plugin.job.JobHelper; | |
| 12 | + | |
| 13 | +import com.cnlive.mz.live.service.impl.Job; | |
| 14 | + | |
| 15 | +public class Init extends HttpServlet { | |
| 16 | + | |
| 17 | + @Override | |
| 18 | + public void init(ServletConfig config) throws ServletException { | |
| 19 | + // 初始化 | |
| 20 | + JobHelper.startJob(Job.class, "0/30 * * * * ?"); | |
| 21 | + } | |
| 22 | + | |
| 23 | + @Override | |
| 24 | + protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | |
| 25 | + super.doGet(req, resp); | |
| 26 | + } | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { | |
| 30 | + super.doPost(req, resp); | |
| 31 | + } | |
| 32 | +} | ... | ... |
src/main/resources/logging.properties
0 → 100644
| 1 | +handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler | |
| 2 | + | |
| 3 | +############################################################ | |
| 4 | +# Handler specific properties. | |
| 5 | +# Describes specific configuration info for Handlers. | |
| 6 | +############################################################ | |
| 7 | + | |
| 8 | +org.apache.juli.FileHandler.level = FINE | |
| 9 | +org.apache.juli.FileHandler.directory = ${catalina.base}/logs | |
| 10 | +org.apache.juli.FileHandler.prefix = error-debug. | |
| 11 | + | |
| 12 | +java.util.logging.ConsoleHandler.level = FINE | |
| 13 | +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter | |
| 0 | 14 | \ No newline at end of file | ... | ... |
src/main/webapp/pages/live/live_add.jsp
| ... | ... | @@ -42,7 +42,7 @@ |
| 42 | 42 | </section> |
| 43 | 43 | <!-- Main content --> |
| 44 | 44 | <section class="content"> |
| 45 | - <form id="create_form" enctype="multipart/form-data" method="post" > | |
| 45 | + <form id="create_form" enctype="multipart/form-data" method="post"> | |
| 46 | 46 | <div class="row"> |
| 47 | 47 | <!-- right column --> |
| 48 | 48 | <div class="col-md-12"> |
| ... | ... | @@ -93,8 +93,8 @@ |
| 93 | 93 | <div class="box box-warning"> |
| 94 | 94 | <div class="box-body"> |
| 95 | 95 | <div class="form-group"> |
| 96 | - <select class="form-control" name="live_room_id" | |
| 97 | - id="live_room_id"> | |
| 96 | + <select class="form-control" name="t_default_video_id" | |
| 97 | + id="t_default_video_id"> | |
| 98 | 98 | <c:forEach var="item" items="${tRooms}" |
| 99 | 99 | varStatus="stat"> |
| 100 | 100 | <option id="t_room_id_${item.id}" ${item.id==tLive.t_room_id ? 'selected="selected"':''} value="${item.id}">${item.name}</option> | ... | ... |