Skip to content

Commit

Permalink
修了发布上的bug,不过会导致本地调试的时候出问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CattenLinger committed Mar 10, 2017
1 parent 23bbae4 commit d01934c
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#简单的课表查询网站

针对广东岭南职业技术学院所使用的教务系统(青果网教务系统)的课表爬取与整理网站
为针对广东岭南职业技术学院所使用的教务系统(青果网教务系统)的课表爬取与整理网站

##公共API

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>net.catten</groupId>
<artifactId>ssim</artifactId>
<packaging>war</packaging>
<version>2.0</version>
<version>3.0</version>

<properties>
<hibernate.version>5.1.0.Final</hibernate.version>
Expand Down Expand Up @@ -218,7 +218,7 @@
<scanIntervalSeconds>5</scanIntervalSeconds>
<webAppSourceDirectory>web</webAppSourceDirectory>
<webApp>
<compactPath>/</compactPath>
<compactPath>/cs</compactPath>
</webApp>
<jvmArgs>
org.eclipse.jetty.util.URI.charset=UTF-8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String querySchedule(

model.addAttribute("schedule",sortedLessons);
model.addAttribute("week",week);
model.addAttribute("class",className);
model.addAttribute("className",className);

return "schedule";
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/context-infrastructure.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/>

<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="1" />
<property name="minIdle" value="1" />
<property name="maxActive" value="20" />

</bean>

<bean class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" name="entityManagerFactory">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ public void run() throws Exception {
// captureThread.setDao(lessonDAO);
// captureThread.run();

for (String term : terms){
captureThread.setTaskCode(term);
captureThread.run();
}
// for (String term : terms){
// captureThread.setTaskCode(term);
// captureThread.run();
// }
}

}
2 changes: 1 addition & 1 deletion src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.logger.captureThread=debug, net.catten.ssim.services.util.CaptureThread
log4j.appender.time=org.apache.log4j.ConsoleAppender
log4j.appender.time.layout=org.apache.log4j.PatternLayout
log4j.appender.time.layout.ConversionPattern=[%-5p] %d{yyyy-MM-dd HH:mm:ss}
log4j.appender.time.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

# An alternative logging format:
# log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n
2 changes: 1 addition & 1 deletion web/WEB-INF/view/index.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>
<div class="list-group">
<#list terms as term>
<a class="list-group-item" href="/terms/${term}">${term}</a>
<a class="list-group-item" href="/cs/terms/${term}">${term}</a>
</#list>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/WEB-INF/view/nodata.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h2>抱歉,没有数据</h2>
</div>
<div class="col-md-4 col-md-offset-4">
<a href="/" class="btn btn-block btn-primary">返回主页</a>
<a href="/cs" class="btn btn-block btn-primary">返回主页</a>
</div>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions web/WEB-INF/view/schedule.ftl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<#import "temp/main.ftl" as temp>
<@temp.body title="${class} 在第 ${week} 周的课程 - ${term}">
<@temp.body title="${className} 在第 ${week} 周的课程 - ${term}">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
<h3>
<small><b>${term}</b></small>
<br>${class}在第${week}周的课程
<br>${className}在第${week}周的课程
</h3>
<div>
<a class="btn btn-primary btn-sm pull-right" href="/terms/${term}">返回</a>
<a class="btn btn-primary btn-sm pull-right" href="/cs/terms/${term}">返回</a>
<div class="clearfix"></div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions web/WEB-INF/view/temp/main.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<html>
<head>
<title>${title}</title>
<meta charset="UTF-8"/>
<meta charset="utf-8"/>
<@_import_css></@_import_css>
</head>
<body>
Expand Down Expand Up @@ -34,8 +34,8 @@
<#macro _import_css>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/animate.css/3.5.2/animate.css">
<link rel="stylesheet" type="text/css" href="/css/bootstrap-select.min.css"/>
<link rel="stylesheet" href="/css/main.css"/>
<link rel="stylesheet" type="text/css" href="/cs/css/bootstrap-select.min.css"/>
<link rel="stylesheet" href="/cs/css/main.css"/>
</#macro>

<#--
Expand All @@ -46,5 +46,5 @@
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="/js/bootstrap-select.min.js"></script>
<script src="/cs/js/bootstrap-select.min.js"></script>
</#macro>
8 changes: 4 additions & 4 deletions web/WEB-INF/view/term.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<h3>查询 ${term} 的课程</h3>
</div>
<div class="panel-body">
<form action="/schedule" method="get" accept-charset="utf-8">
<form action="/cs/schedule" method="get" accept-charset="utf-8">
<input type="hidden" name="termName" value="${term}" required>
<div class="form-group">
<label>班级</label>
<select name="class" class="selectpicker form-control" required data-live-search="true" title="请选择班级">
<#list classes as class>
<option value="${class}">${class}</option>
<#list classes as className>
<option value="${className}">${className}</option>
</#list>
</select>
</div>
Expand All @@ -34,7 +34,7 @@
<div class="form-group">
<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
<input type="submit" class="btn btn-success btn-block" value="查询">
<a href="/" class="btn btn-default btn-block">返回首页</a>
<a href="/cs" class="btn btn-default btn-block">返回首页</a>
</div>
</div>
</form>
Expand Down

0 comments on commit d01934c

Please sign in to comment.