Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
d8608b5c
Commit
d8608b5c
authored
Aug 31, 2017
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
修复数据库连接泄露
parent
60c2350d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
54 deletions
+59
-54
src/main/java/org/b3log/solo/service/ImportService.java
src/main/java/org/b3log/solo/service/ImportService.java
+59
-54
No files found.
src/main/java/org/b3log/solo/service/ImportService.java
View file @
d8608b5c
...
...
@@ -22,6 +22,7 @@ import org.b3log.latke.ioc.inject.Inject;
import
org.b3log.latke.logging.Level
;
import
org.b3log.latke.logging.Logger
;
import
org.b3log.latke.model.User
;
import
org.b3log.latke.repository.jdbc.JdbcRepository
;
import
org.b3log.latke.service.annotation.Service
;
import
org.b3log.latke.util.Strings
;
import
org.b3log.solo.SoloServletListener
;
...
...
@@ -37,7 +38,7 @@ import java.util.*;
* Import service.
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.0.
0.2, Jul 3
, 2017
* @version 1.0.
1.0, Aug 31
, 2017
* @since 2.2.0
*/
@Service
...
...
@@ -71,6 +72,7 @@ public class ImportService {
*/
public
void
importMarkdowns
()
{
new
Thread
(()
->
{
try
{
final
ServletContext
servletContext
=
SoloServletListener
.
getServletContext
();
final
String
markdownsPath
=
servletContext
.
getRealPath
(
"markdowns"
);
LOGGER
.
debug
(
"Import directory ["
+
markdownsPath
+
"]"
);
...
...
@@ -137,6 +139,9 @@ public class ImportService {
logBuilder
.
append
(
" :p"
);
}
LOGGER
.
info
(
logBuilder
.
toString
());
}
finally
{
JdbcRepository
.
dispose
();
}
}).
start
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment