java /
                    
                    正文
                
                
                spring boot 代码结构
                            
                                2024-01-13 23:29
                            
                            1785 浏览
                        
                        
                                
                                    
                                    评论(0)
                                
                                
                        字体大小:
                                    
                                
                            
- 在model(类似于entity)新建Do类class
 -  在dao中建操作数据库的接口(dao就是数据库操作的接口)
用jpa的话基本的操作都有了,复杂业务查询自己写(i18n)
用mybatis的话就要写mapper(xml文件) - 在service里面定义业务逻辑的接口,实现是在service.impl里面写
 - 在controller里面写调用restful服务
 
Spring Boot 使用Swagger2构建RESTful API :http://www.spring4all.com/article/251
 
本文发布于程序达人 ,转载请注明出处,谢谢合作
有 0 人认为有用
                    0 评论
                    
                    共同学习,写下你的评论
相关热点文章推荐
SpringBoot 2.0 报错: Failed to configure a DataSource: 'url' attribute is not specified and no embe...
程序达人 - chengxudaren.com
一个帮助开发者成长的社区
相关文章