Code Monkey home page Code Monkey logo

modest's Introduction

modest

什么是MODEST?

MODEST是将JAVA项目常用技术进行模块化,规范化,统一约束,组件独立维护的一个大整合。
通过它你可快速构建JAVA WEB、微服务或JAVA普通项目;众多技术代码以组件或工具类形式写好,配置即用。

1.在pom.xml中引入

 <parent>
     <groupId>com.modest</groupId>
     <artifactId>modest-parent</artifactId>
     <version>0.0.1</version>
 </parent>
 <dependency>
     <groupId>com.modest</groupId>
     <artifactId>modest-starter</artifactId>
     <version>0.0.1</version>
 </dependency>

2.在你的spring配置文件中加入

<import resource="classpath*:modest.xml" />
<bean class="com.modest.core.config.ScannerConfigurer">
   	<property name="basePackages">
   		<array>
   			<value>写你dao所在路经</value>
   		</array>
   	</property>
   </bean>

3.在你的src/main/resources下创建conf文件 用于存放properties配置文件

默认在conf下找配置文件,生产环境可配置到任意位置,详见demo

4.在你的src/main/resources下创建sqlmap文件 用于存放mybatis的映射xml文件

5.在你的conf文件下创建任意名字配置文件,里面加入jdbc配置。

 jdbc.write.url=写库地址<br>
 jdbc.write.pool.size.max=50<br>
 jdbc.write.username=xxx<br>
 jdbc.write.password=xxx<br>
 jdbc.write.driverclass=com.mysql.jdbc.Driver<br>
 
 jdbc.read.url=写库地址<br>
 jdbc.read.pool.size.max=50<br>
 jdbc.read.username=xxx<br>
 jdbc.read.password=xxx<br>
 jdbc.read.driverclass=com.mysql.jdbc.Driver<br>

 上面部份配置结束后,你即可以开始操作数据库写业务代码啦,默认支持读写分离。
 详细见simple demo
 后续会上传更多组件和文档。

modest's People

Contributors

percychuang avatar

Stargazers

 avatar 凉粉 avatar

Watchers

James Cloos avatar  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.