forked from otale/tale
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 34476a5
Showing
147 changed files
with
21,336 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Tale | ||
|
||
做有逼格的Java博客程序。 | ||
|
||
## 如何使用 | ||
|
||
1. 建立你的博客数据库 | ||
2. 下载最新版 [Tale]() 发布包 | ||
3. 执行 `java -jar tale-xxx.jar` | ||
4. 访问 http://host:port/install 进行安装 | ||
|
||
## 界面预览 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
||
 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.junicorn</groupId> | ||
<artifactId>tale</artifactId> | ||
<version>1.0</version> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<mysql.version>5.1.38</mysql.version> | ||
<druid.version>1.0.24</druid.version> | ||
<blade.version>1.7.1-alpha</blade.version> | ||
<blade-jdbc.version>0.1.5</blade-jdbc.version> | ||
<blade-tpl.verion>0.0.9</blade-tpl.verion> | ||
<blade-embed-jetty.version>0.1.0</blade-embed-jetty.version> | ||
<mysql.version>5.1.38</mysql.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- mvc --> | ||
<dependency> | ||
<groupId>com.bladejava</groupId> | ||
<artifactId>blade-core</artifactId> | ||
<version>${blade.version}</version> | ||
</dependency> | ||
<!-- 数据库操作 --> | ||
<dependency> | ||
<groupId>com.bladejava</groupId> | ||
<artifactId>blade-jdbc</artifactId> | ||
<version>${blade-jdbc.version}</version> | ||
</dependency> | ||
|
||
<!-- 模板引擎 --> | ||
<dependency> | ||
<groupId>com.bladejava</groupId> | ||
<artifactId>blade-template-jetbrick</artifactId> | ||
<version>${blade-tpl.verion}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.alibaba</groupId> | ||
<artifactId>druid</artifactId> | ||
<version>${druid.version}</version> | ||
</dependency> | ||
<!--markdown处理--> | ||
<dependency> | ||
<groupId>com.atlassian.commonmark</groupId> | ||
<artifactId>commonmark</artifactId> | ||
<version>0.8.0</version> | ||
</dependency> | ||
<!--web容器--> | ||
<dependency> | ||
<groupId>com.bladejava</groupId> | ||
<artifactId>blade-embed-jetty</artifactId> | ||
<version>${blade-embed-jetty.version}</version> | ||
</dependency> | ||
<!-- 数据库 --> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>${mysql.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>rome</groupId> | ||
<artifactId>rome</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<repository> | ||
<id>oss-snapshots</id> | ||
<url>https://oss.sonatype.org/content/repositories/snapshots</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
<build> | ||
<finalName>tale</finalName> | ||
<resources> | ||
<resource> | ||
<directory>src/main/java</directory> | ||
<filtering>false</filtering> | ||
</resource> | ||
<!--<resource> | ||
<directory>src/main/resources</directory> | ||
<filtering>false</filtering> | ||
</resource>--> | ||
</resources> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
<!--mvn clean package assembly:single -Dmaven.test.skip=true--> | ||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<appendAssemblyId>false</appendAssemblyId> | ||
<descriptors> | ||
<descriptor>assembly.xml</descriptor> | ||
</descriptors> | ||
<outputDirectory>${project.build.directory}/dist/</outputDirectory> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jar-plugin</artifactId> | ||
<version>2.4</version> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<mainClass>com.tale.Application</mainClass> | ||
<classpathPrefix>lib/</classpathPrefix> | ||
<addClasspath>true</addClasspath> | ||
</manifest> | ||
<manifestEntries> | ||
<!-- 在Class-Path下添加配置文件的路径 --> | ||
<Class-Path>config/</Class-Path> | ||
</manifestEntries> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.tale; | ||
|
||
import static com.blade.Blade.$; | ||
|
||
public class Application { | ||
|
||
public static void main(String[] args) { | ||
$().start(Application.class); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.tale.controller; | ||
|
||
import com.blade.kit.StringKit; | ||
import com.blade.mvc.http.Request; | ||
import com.tale.init.TaleConst; | ||
import com.tale.model.Users; | ||
import com.tale.utils.TaleUtils; | ||
|
||
/** | ||
* Created by biezhi on 2017/2/21. | ||
*/ | ||
public abstract class BaseController { | ||
|
||
public static String THEME = "themes/default"; | ||
|
||
public String render(String viewName) { | ||
return THEME + "/" + viewName; | ||
} | ||
|
||
public BaseController title(Request request, String title) { | ||
request.attribute("title", title); | ||
return this; | ||
} | ||
|
||
public BaseController keywords(Request request, String keywords) { | ||
request.attribute("keywords", keywords); | ||
return this; | ||
} | ||
|
||
public Users user() { | ||
return TaleUtils.getLoginUser(); | ||
} | ||
|
||
public String render_404(){ | ||
return "/comm/error_404"; | ||
} | ||
|
||
} |
Oops, something went wrong.