Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
java镜像
Smart Sample
提交
0151e81d
S
Smart Sample
项目概览
后端镜像
/
java镜像
/
Smart Sample
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Smart Sample
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0151e81d
编写于
4月 25, 2014
作者:
黄
黄勇
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
【F】提供数据源工厂接口,可配置相应的连接池实现
上级
45556dee
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
15 deletion
+10
-15
pom.xml
pom.xml
+5
-13
src/main/java/org/smart4j/sample/action/SystemAction.java
src/main/java/org/smart4j/sample/action/SystemAction.java
+2
-1
src/main/resources/smart.properties
src/main/resources/smart.properties
+3
-1
未找到文件。
pom.xml
浏览文件 @
0151e81d
...
...
@@ -75,6 +75,11 @@
<artifactId>
smart-plugin-i18n
</artifactId>
<version>
${smart.version}
</version>
</dependency>
<dependency>
<groupId>
org.smart4j
</groupId>
<artifactId>
smart-plugin-c3p0
</artifactId>
<version>
${smart.version}
</version>
</dependency>
</dependencies>
<build>
...
...
@@ -116,17 +121,4 @@
</plugins>
</build>
<repositories>
<!-- OSC Public -->
<repository>
<id>
osc
</id>
<url>
http://maven.oschina.net/content/groups/public/
</url>
</repository>
<!-- OSC Thirdparty -->
<repository>
<id>
osc_thirdparty
</id>
<url>
http://maven.oschina.net/content/repositories/thirdparty/
</url>
</repository>
</repositories>
</project>
\ No newline at end of file
src/main/java/org/smart4j/sample/action/SystemAction.java
浏览文件 @
0151e81d
...
...
@@ -6,6 +6,7 @@ import org.smart4j.framework.mvc.annotation.Request;
import
org.smart4j.framework.mvc.bean.Params
;
import
org.smart4j.framework.mvc.bean.Result
;
import
org.smart4j.framework.mvc.bean.View
;
import
org.smart4j.framework.util.StringUtil
;
import
org.smart4j.framework.util.WebUtil
;
import
org.smart4j.sample.Constant
;
import
org.smart4j.security.SmartSecurityHelper
;
...
...
@@ -32,7 +33,7 @@ public class SystemAction {
String
captcha
=
params
.
getString
(
"captcha"
);
String
sessionCaptcha
=
DataContext
.
Session
.
get
(
Constant
.
CAPTCHA
);
if
(!
sessionCaptcha
.
equals
(
captcha
))
{
if
(
StringUtil
.
isNotEmpty
(
sessionCaptcha
)
&&
!
sessionCaptcha
.
equals
(
captcha
))
{
return
new
Result
(
false
).
data
(
"captcha_error"
);
}
...
...
src/main/resources/smart.properties
浏览文件 @
0151e81d
app.package
=
org.smart4j.sample
app.home_page
=
/login
ds.factory
=
org.smart4j.plugin.c3p0.C3P0DataSourceFactory
jdbc.type
=
mysql
jdbc.driver
=
com.mysql.jdbc.Driver
jdbc.url
=
jdbc:mysql://localhost:3306/sample
...
...
@@ -13,4 +15,4 @@ security.realms=custom
security.custom.class
=
org.smart4j.sample.SmartSecurity
security.cache
=
true
sample.upload_path
=
/www/upload/
\ No newline at end of file
sample.upload_path
=
/www/upload/
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录