Giter Club home page Giter Club logo

springbootproject's Introduction

一.收获
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

springbootproject's People

Contributors

enjoycoding666 avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.