
spring-boot
文章平均质量分 64
gwt0425
这个作者很懒,什么都没留下…
展开
-
Spring Boot(2)弃坑了
谈谈Spring全家桶自从用了Spring boot以后,了解了更多的Spring全家桶的东西。之前学的是Android开发,各种框架技术层出不穷,学到很很多,写起来也很有意思。后来学到Servlet就感觉很无聊了,然后接触了SpringMVC,确实简化了很多,但写起来一样无聊。有时写配置文件,也有种很不好的感觉。后来Spring Boot的虽然简化了大部分配置,对Web而言,但还是Java EE技原创 2017-09-23 09:56:17 · 3181 阅读 · 0 评论 -
Spring Boot(1)集成MyBatis的简单使用
需要的东西1.IntelliJ IDEA里面的spring initializer2.Mysql的实例数据库sakila3.自己创建几个文件夹属性配置文件#application.propertymybatis.type-aliases-package=com.example.boot.domainspring.datasource.driverClassName = com.mysql.jdbc.原创 2017-09-21 19:31:26 · 263 阅读 · 0 评论 -
Spring Test
JDBC支持JdbcTestUtilscountRowsInTable(..): counts the number of rows in the given tablecountRowsInTableWhere(..): counts the number of rows in the given table, using the provided WHERE clausedeleteFro原创 2017-10-20 19:37:17 · 420 阅读 · 0 评论 -
Spring DAO
PS: 有了Spring Boot ,看这些感觉要疯呀,感觉文档可能几年没更新过事务@Transactional注解事务传播行为事务监听器@Component public class MyComponent { @TransactionalEventListener public void handleOrderCreatedEvent(Creati原创 2017-10-21 20:28:43 · 273 阅读 · 0 评论 -
Spring IOC
ApplicationContext依赖的包org.springframework.beansorg.springframework.contextApplicationContext这个是提供接口的核心,它还有个直接子接口WebApplicationContext可以直接使用的实现类有:ClassPathXmlApplicationContext 或者FileSystemXmlApplica原创 2017-10-20 19:10:16 · 265 阅读 · 0 评论 -
Spring Boot
外部配置@Value//application.propertiesbook.author=Owenbook.name=啦啦啦//Book.kt@Componentdata class Book(@Value("\${book.author}") var author: String?, @Value("\${book.name}") var name: St原创 2017-10-22 22:00:26 · 294 阅读 · 0 评论