Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
53080717
Commit
53080717
authored
Nov 01, 2019
by
whl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加指标搜索页面及controller
parent
1fa34c77
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
2 deletions
+64
-2
bsoft-api/pom.xml
+6
-0
bsoft-api/src/main/java/com/bsoft/api/controller/IndController.java
+46
-0
bsoft-api/src/main/resources/application-test.properties
+12
-2
No files found.
bsoft-api/pom.xml
View file @
53080717
...
...
@@ -84,6 +84,12 @@
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-thymeleaf
</artifactId>
</dependency>
</dependencies>
<build>
...
...
bsoft-api/src/main/java/com/bsoft/api/controller/IndController.java
0 → 100644
View file @
53080717
package
com
.
bsoft
.
api
.
controller
;
import
com.bsoft.api.model.respmodel.IndInfo
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.servlet.ModelAndView
;
import
java.util.ArrayList
;
import
java.util.List
;
@RequestMapping
(
"ind"
)
@Controller
public
class
IndController
{
@GetMapping
public
ModelAndView
index
(
Model
model
,
String
filter
){
model
.
addAttribute
(
"title"
,
"指标搜索"
);
// TODO 查询指标数据
List
<
IndInfo
>
list
=
new
ArrayList
<
IndInfo
>(){
{
add
(
new
IndInfo
(){
{
setCode
(
"1"
);
setName
(
"指标1"
);
setFieldName
(
"ZB"
);
}
});
}
};
model
.
addAttribute
(
"indList"
,
list
);
model
.
addAttribute
(
"filter"
,
filter
==
null
?
""
:
filter
);
ModelAndView
mav
=
new
ModelAndView
(
"ind"
,
"indModel"
,
model
);
return
mav
;
}
@PostMapping
(
"search"
)
public
ModelAndView
search
(
String
filter
){
return
new
ModelAndView
(
"redirect:/ind?filter="
+
filter
);
}
}
bsoft-api/src/main/resources/application-test.properties
View file @
53080717
...
...
@@ -25,4 +25,14 @@ spring.redis.jedis.pool.min-idle=0
spring.redis.timeout
=
10000
swagger.enabled
=
true
swagger.basePackage
=
com.bsoft.api.controller
\ No newline at end of file
swagger.basePackage
=
com.bsoft.api.controller
spring.mvc.view.prefix
=
/WEB-INF/views/
spring.mvc.view.suffix
=
.jsp
#Thymeleaf\u914D\u7F6E
spring.thymeleaf.cache
=
false
spring.thymeleaf.encoding
=
utf-8
spring.thymeleaf.mode
=
HTML5
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.suffix
=
.html
\ No newline at end of file
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