springboot+mybatis+shiro框架

来源:互联网 发布:井柏然手写字体软件 编辑:程序博客网 时间:2024/06/04 19:05

springboot+mybatis+shiro 分模块项目框架。

包含如下功能:
1.目录生成
2.权限控制
3.定时任务
4.bean注入
5.url过滤器
prent.xml
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-parent</artifactId><packaging>pom</packaging><parent>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-parent</artifactId>        <version>1.3.3.RELEASE</version>    </parent><!--申明依赖关系-->    <dependencies>    <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope></dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency><dependency><groupId>org.mybatis.spring.boot</groupId><artifactId>mybatis-spring-boot-starter</artifactId><version>1.1.1</version></dependency>     <dependency>        <groupId>mysql</groupId>        <artifactId>mysql-connector-java</artifactId>    </dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-tomcat</artifactId><scope>provided</scope></dependency>     <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-devtools</artifactId>        <optional>true</optional></dependency><!-- shiro 权限  --><dependency><groupId>org.apache.shiro</groupId><artifactId>shiro-spring</artifactId><version>1.4.0</version></dependency><!-- velocity --><dependency>        <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-starter-velocity</artifactId>  </dependency>     </dependencies>    <modules><module>pingmi-service</module><module>pingmi-web</module><module>pingmi-front</module></modules></project>

service.xml
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><artifactId>pingmi-service</artifactId><packaging>jar</packaging><parent><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-parent</artifactId><version>1.0.0</version></parent><dependencies><!-- 壹平方工具包 --><dependency><groupId>com.qingbo.onem2</groupId><artifactId>onem2-base</artifactId><version>2.1.3-SNAPSHOT</version></dependency><!--pagehelper -->        <dependency>            <groupId>com.github.pagehelper</groupId>            <artifactId>pagehelper-spring-boot-starter</artifactId>            <version>1.1.1</version>        </dependency>        <!-- 阿里巴巴Json -->        <dependency>            <groupId>com.alibaba</groupId>            <artifactId>fastjson</artifactId>            <version>1.2.31</version>        </dependency>    </dependencies></project>

web.xml
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><artifactId>pingmi-web</artifactId><packaging>jar</packaging><parent><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-parent</artifactId><version>1.0.0</version></parent><dependencies><dependency><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-service</artifactId><version>1.0.0</version></dependency></dependencies></project>

front.xml
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"><modelVersion>4.0.0</modelVersion><artifactId>pingmi-front</artifactId><packaging>war</packaging><parent><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-parent</artifactId><version>1.0.0</version></parent><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>     <dependency>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-devtools</artifactId>        <optional>true</optional></dependency><dependency><groupId>com.onem2.pingmi</groupId><artifactId>pingmi-web</artifactId><version>1.0.0</version></dependency></dependencies></project>


启动配置


2.编译



run as --> maven install

源码下载地址:http://download.csdn.net/download/u012547633/10124803

注意:shiro 包要转移至 注解目录下面,否则无法扫描到


原创粉丝点击