Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-wx
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a46e459f
authored
Mar 16, 2020
by
魏文甫
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'wei_master' into '105'
Wei master See merge request
!20
2 parents
88b8a53f
a665e34f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
src/main/java/com/server/Application.java
src/main/java/com/server/common/configure/ConfigRedisSession.java
src/main/resources/mybatis/mapping/CommentMapper.xml
src/main/java/com/server/Application.java
View file @
a46e459
...
...
@@ -3,7 +3,10 @@ package com.server;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer
;
import
org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
@SpringBootApplication
...
...
@@ -16,4 +19,13 @@ public class Application {
SpringApplication
application
=
new
SpringApplication
(
Application
.
class
);
application
.
run
(
args
);
}
@Bean
public
EmbeddedServletContainerCustomizer
containerCustomizer
(){
return
new
EmbeddedServletContainerCustomizer
()
{
@Override
public
void
customize
(
ConfigurableEmbeddedServletContainer
container
)
{
container
.
setSessionTimeout
(
1800
);
//单位为S
}
};
}
}
src/main/java/com/server/common/configure/ConfigRedisSession.java
View file @
a46e459
...
...
@@ -10,6 +10,6 @@ import org.springframework.session.data.redis.config.annotation.web.http.EnableR
@Configuration
@EnableRedisHttpSession
(
maxInactiveIntervalInSeconds
=
18
00
,
redisNamespace
=
"kzy_wx"
)
@EnableRedisHttpSession
(
maxInactiveIntervalInSeconds
=
864
00
,
redisNamespace
=
"kzy_wx"
)
public
class
ConfigRedisSession
{
}
\ No newline at end of file
src/main/resources/mybatis/mapping/CommentMapper.xml
View file @
a46e459
...
...
@@ -40,7 +40,7 @@
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2
AND t.relation_id = #{
course
Id,jdbcType=BIGINT}
AND t.relation_id = #{
information
Id,jdbcType=BIGINT}
ORDER BY
t.id DESC
LIMIT #{start,jdbcType=INTEGER},#{pageSize,jdbcType=INTEGER}
...
...
@@ -53,7 +53,7 @@
LEFT JOIN t_kzy_user u ON t.user_id = u.id AND t.type = 1
WHERE
t.is_delete = 0 AND t.auth_status=2
AND t.relation_id = #{
course
Id,jdbcType=BIGINT}
AND t.relation_id = #{
information
Id,jdbcType=BIGINT}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment