Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

user654name/SpringBootProject

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

一.收获
1.熟悉一下SpringBoot;
2.加强SSM的理解
3.加强单元测试的运用,断言,配合SpringBoot的注解
4.了解shiro、redis等框架
5.过滤器filter进行url过滤,设置访问权限
6.熟悉mysql的外键、join、union
7.Controller层最好不要写太多逻辑。业务逻辑全放在Service才比较规范
8.SpringBoot不太建议使用xml配置。尽可能在application.yml或者用java代码配置。

一.待添加功能:
1.Shiro框架,,MD5加密 (完成)
2.后端模板freemaker、Thymeleaf等 (完成 )
3.集成redis缓存。(完成) ehcache缓存
4.添加mybatis的日志.(完成)
5.Druid数据库连接池
6.mybatis-plus。

二.遇到的障碍:
1.Mybatis找不到生成的Mapper对应的Class文件,需要配置Mybatis属性
2.Spring依赖注入,@Autowired和@Resource的细节 .@Autowired按类型注入,@Resource按名称注入
3.网址中Url的参数,取的值是等号后面的内容,包括引号在内。
比如,http://localhost:8080/user?name=admin
4.@Configuration和@Bean
通过注解配置注入Bean
5.html如何获取后台的数据?
可以通过模板引擎获取.比如ThymeLeaf、Freemaker、jsp。设置Model、Request等对象的attribute.在页面通过el表达式获取
6.注意@RestController和@Controller的区别,@RestController返回字符串时会直接显示文本,而不是跳转到对应的页面
7.UserRealm中注入service对象报空指针?
原因是在ShiroConfig中,没有注入realm
8.shiro过滤器filterChainDefinitionMap,具体如何配置?
ShiroConfiguration中注入过滤链。根据url过滤
9.shiro的注解@RequiresRoles("admin")不起作用,非管理员怎么也可以登陆?
需要在ShiroConfiguration中添加支持aop、代理的bean
10.Ehcache缓存注解不起作用.(折腾好久还是没解决。)
可能是缓存起作用了。只是忘了打log而已。问题定位不准确。
11.账号:admin 密码:123456

About

SpringBoot+SpringMVC+Mybatis+Shiro+Redis+Logback

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 96.0%
  • HTML 4.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.