# InterestTech **Repository Path**: lgenius/InterestTech ## Basic Information - **Project Name**: InterestTech - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-12-20 - **Last Updated**: 2024-11-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README - ##### 该项目为基础项目(暂定为 兴趣技术) - ##### 项目架构 spring + spring mvc + mybatis - ##### 包结构 - src/main/java下 com/interest/aspect // aop相关 com/interest/authorization // token 权限相关 com/interest/base/ // 全局基础代码 com/interest/base/common // 常用 常量等 com/interest/base/entity // 全局实体 com/interest/base/exception // 异常 com/interest/base/utils // 工具类包 com/interest/controller // mvc 控制类包 com/interest/execshell // 命令行相关 com/interest/modules/ // 业务包 com/interest/modules/account/ // 每个module的包结构如下 com/interest/modules/account/dao com/interest/modules/account/entity com/interest/modules/account/service ... - ##### 项目存储为mysql + redis - mysql 大家自行安装 创建好之后建立数据库 db_tech 这里涉及到数据库命名规范 > 1.数据库名 以 db_ 开头 e.g. db_example > 2.表名 以 tb_ 开头 e.g. tb_example > 3.字段名称 以 _ 开头 e.g. _id _name _a_example ... 数据库建好后,导入初始数据 在init_sql/*sql 即可 - Redis 作为key-value的缓存存储 大家可网上找教程安装 并熟悉下 项目中 用的JedisPool管理redis 大家只要安装后设置好自己的密码即可 如果出现问题可以随时@wangliang - ##### 自动生成mybatis代码的工具使用 - 1.根据业务设计数据库表,并用Mysql workbench 创建 - 2.编辑/mybatis_generator/generatorConfig.xml - javaModelGenerator 标签中 targetPackage="com.interest.modules.test.entity" `test`修改为对应的module名 - javaClientGenerator 标签中 targetPackage="com.interest.modules.test.dao" `test`修改为对应的module名 - table 标签中 tableName="`数据库表名`" domainObjectName="`Entity对应的名称`" - 3.cd到 项目根目录 执行 `sh mybatis_generate.sh` 即可完成 - ##### FAQS * Q: 配置文件resources/log4j.properties配置log4j的输入log目录使用apache tomcat安装的绝对路径, 服务器安装路径和每个开发人员路径会不一样,如何保持一份log4j.properties在各种安装环境中正常工作? A: 方法一, 在根目录创建链接文件/tomcatserver指向实际的Apache Tomcat安装目录, 如/opt/apache-tomcat, 然后创建日志目录. 参考tools/deploy_inspector.sh的检查logs文件夹部分. $cd / && sudo ln -s /opt/apache-tomcat tomcatserver && mkdir -p /tomcatserver/logs/wl-demo 方法二, 在log4j.properties里使用相对路径 ../logs/wl-demo - ##### 友情链接 * [ubuntu 环境搭建笔记](http://note.youdao.com/noteshare?id=7c89e96a690f4716bfeeea9580a43dd8) * [Intelij 部署到远程服务器](http://note.youdao.com/share/?id=fb7683658690ed8e335d0e969e788a61&type=note#/)