Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
勿忘初心_LGH
SpringCloud
提交
48b795a6
S
SpringCloud
项目概览
勿忘初心_LGH
/
SpringCloud
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SpringCloud
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
48b795a6
编写于
4月 24, 2019
作者:
勿忘初心_LGH
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加代码生成工具并创建组织模块
上级
edfc0b71
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
211 addition
and
150 deletion
+211
-150
cloud-service/mybatisplus3-boot2/src/main/resources/mapper/LogSiteLogMapper.xml
...lus3-boot2/src/main/resources/mapper/LogSiteLogMapper.xml
+0
-7
cloud-service/mybatisplus3-boot2/src/test/java/com/js/my/test/My.java
...e/mybatisplus3-boot2/src/test/java/com/js/my/test/My.java
+8
-8
cloud-service/mybatisplus3-boot2/target/classes/META-INF/MANIFEST.MF
...ce/mybatisplus3-boot2/target/classes/META-INF/MANIFEST.MF
+0
-5
cloud-service/mybatisplus3-boot2/target/classes/META-INF/maven/com.my/mybatisplus3-boot2/pom.properties
...s/META-INF/maven/com.my/mybatisplus3-boot2/pom.properties
+0
-7
cloud-service/mybatisplus3-boot2/target/classes/META-INF/maven/com.my/mybatisplus3-boot2/pom.xml
.../classes/META-INF/maven/com.my/mybatisplus3-boot2/pom.xml
+0
-116
cloud-service/mybatisplus3-boot2/target/classes/mapper/LogSiteLogMapper.xml
...tisplus3-boot2/target/classes/mapper/LogSiteLogMapper.xml
+0
-7
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/CodeGeneratorTest.class
...omidou/mybatisplus/test/generator/CodeGeneratorTest.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/DB2Generator.class
...om/baomidou/mybatisplus/test/generator/DB2Generator.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/GeneratorTest.class
...m/baomidou/mybatisplus/test/generator/GeneratorTest.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/MyPostgreSqlQuery.class
...omidou/mybatisplus/test/generator/MyPostgreSqlQuery.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/MysqlGenerator.class
.../baomidou/mybatisplus/test/generator/MysqlGenerator.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/PostgreSQLGenerator.class
...idou/mybatisplus/test/generator/PostgreSQLGenerator.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/SQLServerGenerator.class
...midou/mybatisplus/test/generator/SQLServerGenerator.class
+0
-0
cloud-service/mybatisplus3-boot2/target/test-classes/com/js/my/test/My.class
...isplus3-boot2/target/test-classes/com/js/my/test/My.class
+0
-0
cloud-service/organization-center/.gitignore
cloud-service/organization-center/.gitignore
+6
-0
cloud-service/organization-center/README.md
cloud-service/organization-center/README.md
+1
-0
cloud-service/organization-center/pom.xml
cloud-service/organization-center/pom.xml
+91
-0
cloud-service/organization-center/src/main/java/com/cloud/organization/config/ResourceServerConfig.java
...a/com/cloud/organization/config/ResourceServerConfig.java
+44
-0
cloud-service/organization-center/src/main/java/com/cloud/organization/config/SwaggerConfig.java
...ain/java/com/cloud/organization/config/SwaggerConfig.java
+29
-0
cloud-service/organization-center/src/main/resources/.gitignore
...service/organization-center/src/main/resources/.gitignore
+1
-0
cloud-service/organization-center/src/main/resources/bootstrap.yml
...vice/organization-center/src/main/resources/bootstrap.yml
+30
-0
cloud-service/pom.xml
cloud-service/pom.xml
+1
-0
未找到文件。
cloud-service/mybatisplus3-boot2/src/main/resources/mapper/LogSiteLogMapper.xml
已删除
100644 → 0
浏览文件 @
edfc0b71
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.js.site.log.manage.mapper.LogSiteLogMapper"
>
</mapper>
cloud-service/mybatisplus3-boot2/src/test/java/com/js/my/test/My.java
浏览文件 @
48b795a6
...
...
@@ -25,11 +25,11 @@ import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import
com.baomidou.mybatisplus.test.generator.GeneratorTest
;
public
class
My
extends
GeneratorTest
{
private
static
String
BASE_PATH
=
"com.
js.site.log.manage
"
;
// 包路径
private
static
String
BASE_PATH
=
"com.
cloud.organization
"
;
// 包路径
private
static
String
OUT_CLASS_PATH
=
"/src/main/java"
;
private
static
String
OUT_XML_PATH
=
"/src/main/resources/mapper/"
;
//数据库
private
static
String
TABLENAMES
[]
=
{
"
LOG_SITE_LOG"
};
private
static
String
TABLENAMES
[]
=
{
"
cloud_org"
};
public
static
void
main
(
String
[]
args
)
throws
IOException
{
AutoGenerator
mpg
=
new
AutoGenerator
();
...
...
@@ -38,7 +38,7 @@ public class My extends GeneratorTest {
tableFillList
.
add
(
new
TableFill
(
"ASDD_SS"
,
FieldFill
.
INSERT_UPDATE
));
// 直接输出到目录
File
directory
=
new
File
(
""
);
// 参数为空
File
directory
=
new
File
(
"
E:\\Mywork\\cloud-service\\organization-center\\src\\main\\java\\com\\cloud\\organization
"
);
// 参数为空
final
String
outFile
=
directory
.
getCanonicalPath
();
System
.
out
.
println
(
outFile
);
...
...
@@ -64,11 +64,11 @@ public class My extends GeneratorTest {
/***** 数据源配置 ********************************************/
DataSourceConfig
dsc
=
new
DataSourceConfig
();
dsc
.
setDbType
(
DbType
.
ORACLE
);
dsc
.
setDriverName
(
"
oracle.jdbc.Oracle
Driver"
);
dsc
.
setUsername
(
"
scott2
"
);
dsc
.
setPassword
(
"
scot
t"
);
dsc
.
setUrl
(
"jdbc:
oracle:thin:@192.168.1.188:1521:orcl
"
);
dsc
.
setDbType
(
DbType
.
MYSQL
);
dsc
.
setDriverName
(
"
com.mysql.jdbc.
Driver"
);
dsc
.
setUsername
(
"
root
"
);
dsc
.
setPassword
(
"
roo
t"
);
dsc
.
setUrl
(
"jdbc:
mysql://loclhost:3306/cloud_organization?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
"
);
mpg
.
setDataSource
(
dsc
);
/***** 策略配置 ********************************************/
...
...
cloud-service/mybatisplus3-boot2/target/classes/META-INF/MANIFEST.MF
已删除
100644 → 0
浏览文件 @
edfc0b71
Manifest-Version: 1.0
Built-By: wuwangchuxin
Build-Jdk: 1.8.0_131
Created-By: Maven Integration for Eclipse
cloud-service/mybatisplus3-boot2/target/classes/META-INF/maven/com.my/mybatisplus3-boot2/pom.properties
已删除
100644 → 0
浏览文件 @
edfc0b71
#Generated by Maven Integration for Eclipse
#Fri Dec 28 09:29:58 CST 2018
version
=
0.0.1-SNAPSHOT
groupId
=
com.my
m2e.projectName
=
mybatisplus3-boot2
m2e.projectLocation
=
D
\:\\
work
\\
sichuang
\\
mybatisplus3-boot2
artifactId
=
mybatisplus3-boot2
cloud-service/mybatisplus3-boot2/target/classes/META-INF/maven/com.my/mybatisplus3-boot2/pom.xml
已删除
100644 → 0
浏览文件 @
edfc0b71
<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>
<groupId>
com.my
</groupId>
<artifactId>
mybatisplus3-boot2
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- MP 核心库 -->
<dependency>
<groupId>
com.baomidou
</groupId>
<artifactId>
mybatis-plus
</artifactId>
<version>
3.0.2
</version>
</dependency>
<!-- oracle驱动 -->
<!-- ////////////////////mybatis-plus 公共部分 //////////////////// -->
<dependency>
<groupId>
com.oracle
</groupId>
<artifactId>
ojdbc6
</artifactId>
<version>
11.2.0.3
</version>
</dependency>
<!-- 单元测试 -->
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.11
</version>
<scope>
test
</scope>
</dependency>
<!-- 日志 -->
<!-- 实现slf4j接口并整合 -->
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<version>
1.1.1
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.46
</version>
<scope>
runtime
</scope>
</dependency>
<!-- Spring -->
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-core
</artifactId>
<version>
4.3.10.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-beans
</artifactId>
<version>
4.3.10.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-webmvc
</artifactId>
<version>
4.3.10.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.springframework
</groupId>
<artifactId>
spring-jdbc
</artifactId>
<version>
4.3.10.RELEASE
</version>
</dependency>
<!-- MP 代码生成工具需要的依赖1 velocity-engine-core 2 slf4j-api 3slf4j-log4j12 -->
<!-- Apache velocity -->
<dependency>
<groupId>
org.apache.velocity
</groupId>
<artifactId>
velocity-engine-core
</artifactId>
<version>
2.0
</version>
</dependency>
<!-- sfl4j -->
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-api
</artifactId>
<version>
1.7.7
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
slf4j-log4j12
</artifactId>
<version>
1.7.7
</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.5
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
\ No newline at end of file
cloud-service/mybatisplus3-boot2/target/classes/mapper/LogSiteLogMapper.xml
已删除
100644 → 0
浏览文件 @
edfc0b71
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.js.site.log.manage.mapper.LogSiteLogMapper"
>
</mapper>
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/CodeGeneratorTest.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/DB2Generator.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/GeneratorTest.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/MyPostgreSqlQuery.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/MysqlGenerator.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/PostgreSQLGenerator.class
已删除
100644 → 0
浏览文件 @
edfc0b71
文件已删除
cloud-service/mybatisplus3-boot2/target/test-classes/com/baomidou/mybatisplus/test/generator/SQLServerGenerator.class
已删除
100644 → 0
浏览文件 @
edfc0b71
文件已删除
cloud-service/mybatisplus3-boot2/target/test-classes/com/js/my/test/My.class
浏览文件 @
48b795a6
无法预览此类型文件
cloud-service/organization-center/.gitignore
0 → 100644
浏览文件 @
48b795a6
/.settings/
/target/
/.classpath
/.project
/logs/
/*.iml
\ No newline at end of file
cloud-service/organization-center/README.md
0 → 100644
浏览文件 @
48b795a6
# 组织中心
cloud-service/organization-center/pom.xml
0 → 100644
浏览文件 @
48b795a6
<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>
organization-center
</artifactId>
<packaging>
jar
</packaging>
<parent>
<groupId>
com.cloud
</groupId>
<artifactId>
cloud-service
</artifactId>
<version>
2.0
</version>
</parent>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-config
</artifactId>
</dependency>
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<scope>
runtime
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-oauth2
</artifactId>
</dependency>
<dependency>
<groupId>
com.cloud
</groupId>
<artifactId>
log-starter
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<!--redis连接池需要此依赖-->
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-pool2
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.session
</groupId>
<artifactId>
spring-session-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-bean-validators
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
${swagger.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-zipkin
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
</dependency>
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
<!--打jar包去掉版本号-->
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
cloud-service/organization-center/src/main/java/com/cloud/organization/config/ResourceServerConfig.java
0 → 100644
浏览文件 @
48b795a6
package
com.cloud.organization.config
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.EnableWebSecurity
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer
;
import
org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
;
import
com.cloud.common.constants.PermitAllUrl
;
/**
* 资源服务配置
*
* @author lgh
*@EnableResourceServer该注解可以调用认证中心的信息
*/
@EnableResourceServer
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
public
class
ResourceServerConfig
extends
ResourceServerConfigurerAdapter
{
@Override
public
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
csrf
().
disable
().
exceptionHandling
()
.
authenticationEntryPoint
(
(
request
,
response
,
authException
)
->
response
.
sendError
(
HttpServletResponse
.
SC_UNAUTHORIZED
))
.
and
().
authorizeRequests
()
.
antMatchers
(
PermitAllUrl
.
permitAllUrl
(
"/users-anon/**"
,
"/wechat/**"
)).
permitAll
()
// 放开权限的url
.
anyRequest
().
authenticated
().
and
().
httpBasic
();
}
@Bean
public
BCryptPasswordEncoder
passwordEncoder
()
{
return
new
BCryptPasswordEncoder
();
}
}
cloud-service/organization-center/src/main/java/com/cloud/organization/config/SwaggerConfig.java
0 → 100644
浏览文件 @
48b795a6
package
com.cloud.organization.config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.service.Contact
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
* swagger文档
*
* @author lgh
*
*/
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
@Bean
public
Docket
docket
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
).
groupName
(
"用户中心swagger接口文档"
)
.
apiInfo
(
new
ApiInfoBuilder
().
title
(
"用户中心swagger接口文档"
)
.
contact
(
new
Contact
(
"lgh"
,
""
,
"lghwuwangchuxin@163.com"
)).
version
(
"1.0"
).
build
())
.
select
().
paths
(
PathSelectors
.
any
()).
build
();
}
}
cloud-service/organization-center/src/main/resources/.gitignore
0 → 100644
浏览文件 @
48b795a6
/rebel.xml
cloud-service/organization-center/src/main/resources/bootstrap.yml
0 → 100644
浏览文件 @
48b795a6
spring
:
application
:
name
:
organization-center
cloud
:
config
:
discovery
:
enabled
:
true
serviceId
:
config-center
profile
:
dev
fail-fast
:
true
server
:
port
:
1111
eureka
:
client
:
serviceUrl
:
defaultZone
:
http://local.register.com:8761/eureka/
registry-fetch-interval-seconds
:
5
instance
:
lease-expiration-duration-in-seconds
:
15
lease-renewal-interval-in-seconds
:
5
prefer-ip-address
:
true
instance-id
:
${spring.application.name}:${server.port}
management
:
endpoints
:
web
:
exposure
:
include
:
"
*"
endpoint
:
health
:
show-details
:
always
\ No newline at end of file
cloud-service/pom.xml
浏览文件 @
48b795a6
...
...
@@ -20,6 +20,7 @@
<module>
log-starter
</module>
<module>
file-center
</module>
<module>
notification-center
</module>
<module>
organization-center
</module>
</modules>
<parent>
<groupId>
org.springframework.boot
</groupId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录