Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
西魏
cms_sys
Commits
667e4352
Commit
667e4352
authored
Aug 09, 2019
by
铭飞
Committed by
Gitee
Aug 09, 2019
Browse files
Options
Browse Files
Download
Plain Diff
!174 搜索模板
Merge pull request !174 from 灰色DT/4.7.1
parents
10deda68
e8f2f849
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
17 deletions
+22
-17
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+11
-0
WebConfig.java
src/main/java/net/mingsoft/config/WebConfig.java
+7
-13
search.htm
src/main/webapp/templets/1/default/search.htm
+4
-4
No files found.
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
667e4352
...
@@ -30,6 +30,8 @@ import java.util.List;
...
@@ -30,6 +30,8 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -194,8 +196,17 @@ public class GeneraterAction extends BaseAction {
...
@@ -194,8 +196,17 @@ public class GeneraterAction extends BaseAction {
CmsParserUtil
.
generateList
(
column
,
articleIdList
.
size
());
CmsParserUtil
.
generateList
(
column
,
articleIdList
.
size
());
break
;
break
;
case
ColumnEntity
.
COLUMN_TYPE_COVER
:
// 单页
case
ColumnEntity
.
COLUMN_TYPE_COVER
:
// 单页
if
(
articleIdList
.
size
()==
0
){
ColumnArticleIdBean
columnArticleIdBean
=
new
ColumnArticleIdBean
();
CopyOptions
copyOptions
=
CopyOptions
.
create
();
copyOptions
.
setIgnoreError
(
true
);
BeanUtil
.
copyProperties
(
column
,
columnArticleIdBean
,
copyOptions
);
articleIdList
.
add
(
columnArticleIdBean
);
}
CmsParserUtil
.
generateBasic
(
articleIdList
);
CmsParserUtil
.
generateBasic
(
articleIdList
);
break
;
break
;
default
:
throw
new
IllegalStateException
(
"Unexpected value: "
+
column
.
getColumnType
());
}
}
}
}
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
...
...
src/main/java/net/mingsoft/config/WebConfig.java
View file @
667e4352
...
@@ -53,19 +53,13 @@ public class WebConfig implements WebMvcConfigurer {
...
@@ -53,19 +53,13 @@ public class WebConfig implements WebMvcConfigurer {
@Override
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
//jar包方式映射处理
String
classPath
=
BasicUtil
.
getClassPath
(
""
);
registry
.
addResourceHandler
(
"/upload/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"upload"
)
+
File
.
separator
);
if
(
classPath
.
startsWith
(
"file"
))
{
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"html"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/upload/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"upload"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/templets/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"templets"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"html"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"app"
)
+
File
.
separator
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/templets/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"templets"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"static"
)
+
File
.
separator
,
"classpath:/static/"
);
}
else
{
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"api"
)
+
File
.
separator
,
"classpath:/api/"
);
//必须做判断,不然jar运行的html路径会被覆盖掉
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"/html/"
);
}
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"classpath:/api/"
);
}
}
/**
/**
...
...
src/main/webapp/templets/1/default/search.htm
View file @
667e4352
...
@@ -27,10 +27,10 @@
...
@@ -27,10 +27,10 @@
</ul>
</ul>
</div>
</div>
<div
class=
"ms-content-main-page"
>
<div
class=
"ms-content-main-page"
>
<a
class=
"ms-content-main-page-first"
href=
"{ms:
global.url/}{ms:
page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-first"
href=
"{ms:page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:
global.url/}{ms:
page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:
global.url/}{ms:
page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:
global.url/}{ms:
page.last/}"
>
末页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:page.last/}"
>
末页
</a>
</div>
</div>
</div>
</div>
</div>
</div>
...
...
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