用户管理:搭建系统微服务
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                用户管理:搭建系统微服务
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                
                            
                            
                            <?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"><parent><artifactId>ihrm_parent</artifactId><groupId>com.ihrm</groupId><version>1.0-SNAPSHOT</version></parent><modelVersion>4.0.0</modelVersion><artifactId>ihrm_system</artifactId><dependencies><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-data-jpa</artifactId></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency><dependency><groupId>com.ihrm</groupId><artifactId>ihrm_common</artifactId><version>1.0-SNAPSHOT</version></dependency><dependency><groupId>com.ihrm</groupId><artifactId>ihrm_common_model</artifactId><version>1.0-SNAPSHOT</version></dependency></dependencies>
</project> 
#服務配置
server:port: 9002
#spring配置
spring:#1.應用配置application:name: ihrm-system #指定服務名#2.數據庫連接池datasource:driver-class-name: com.mysql.jdbc.Driverurl: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8username: rootpassword: 123456#3.JPAjpa:database: MySQLshow-sql: trueopen-in-view: true
 
package com.learn.system;import com.learn.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.annotation.Bean;//1.配置springboot的包掃描
@SpringBootApplication(scanBasePackages = "com.learn")
//2.配置jpa注解的掃描
@EntityScan(value="com.learn.domain.system")
public class SystemApplication {/*** 啟動方法*/public static void main(String[] args) {SpringApplication.run(SystemApplication.class,args);}@Beanpublic IdWorker idWorker() {return new IdWorker();}
}
 
                        
                        
                        ?
總結
以上是生活随笔為你收集整理的用户管理:搭建系统微服务的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: SaaS权限控制:设计思路和表分析
- 下一篇: 角色管理与今日内容介绍
