Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-screen
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
byit-screen
Commits
69645267
Commit
69645267
authored
Jul 09, 2019
by
lichaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ao
parent
ce035d02
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
438 additions
and
2 deletions
+438
-2
Dockerfile
byit-screen-computer/Dockerfile
+13
-0
pom.xml
byit-screen-computer/pom.xml
+18
-0
bootstrap.properties
...n-computer/src/main/resources/config/bootstrap.properties
+2
-0
application.properties
...uter/src/main/resources/config/dev/application.properties
+31
-0
logging-config.xml
...een-computer/src/main/resources/config/logging-config.xml
+90
-0
application.properties
...uter/src/main/resources/config/pro/application.properties
+31
-0
application.properties
...ter/src/main/resources/config/test/application.properties
+31
-0
generatorConfig.xml
...computer/src/main/resources/generator/generatorConfig.xml
+37
-0
pom.xml
byit-screen-service/pom.xml
+153
-2
ScreenApplication.java
...een-service/src/main/java/com/byit/ScreenApplication.java
+23
-0
pom.xml
pom.xml
+9
-0
No files found.
byit-screen-computer/Dockerfile
0 → 100644
View file @
69645267
FROM
10.0.120.2/byit/byit-base
MAINTAINER
ZHANG
ENV
JAVA_OPTS="-XX:MetaspaceSize=128m \
-XX:MaxMetaspaceSize=128m \
-Xms750m -Xmx750m -Xmn256m \
-Xss256k -XX:SurvivorRatio=8 \
-XX:+UseConcMarkSweepGC"
RUN
echo
"Asia/Shanghai"
>
/etc/timezone
RUN
mkdir
-p
/server/data/logs
WORKDIR
/server
ADD
*.jar /server/
ENTRYPOINT
java -jar ${JAVA_OPTS} *.jar
\ No newline at end of file
byit-screen-computer/pom.xml
0 → 100644
View file @
69645267
<?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>
byit-screen
</artifactId>
<groupId>
com.byit.byit-screen
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.byit.byit-screen
</groupId>
<artifactId>
byit-screen-computer
</artifactId>
</project>
\ No newline at end of file
byit-screen-computer/src/main/resources/config/bootstrap.properties
0 → 100644
View file @
69645267
spring.cloud.config.uri
=
http://10.0.10.136:3001/
\ No newline at end of file
byit-screen-computer/src/main/resources/config/dev/application.properties
0 → 100644
View file @
69645267
server.port
=
9101
spring.cloud.config.profile
=
dev
spring.application.name
=
screenservice
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
mybatis.mapper-locations
=
classpath*:mapping/*.xml
eureka.client.service-url.defaultZone
=
http://10.0.10.136:2001/eureka/
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.prefer-ip-address
=
true
eureka.instance.lease-renewal-interval-in-seconds
=
1
eureka.instance.lease-expiration-duration-in-seconds
=
2
logging.config
=
classpath:config/logging-config.xml
logging.path
=
/home/logger/screen_service_log
logging.file
=
screen_service_log
\ No newline at end of file
byit-screen-computer/src/main/resources/config/logging-config.xml
0 → 100644
View file @
69645267
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>-->
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"file-debug"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_debug.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"file-info"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_info.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"file-error"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_error.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<appender
name=
"file-biz"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${LOG_PATH}/${LOG_FILE}_biz.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<logger
name=
"permissionServiceBiz"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"file-biz"
/>
</logger>
<logger
name=
"screenBiz"
level=
"info"
additivity=
"false"
>
<appender-ref
ref=
"file-biz"
/>
</logger>
<logger
name=
"org.springframework.web"
level=
"DEBUG"
/>
<logger
name=
"com.ibatis"
level=
"DEBUG"
/>
<logger
name=
"com.ibatis.common.jdbc.SimpleDataSource"
level=
"DEBUG"
/>
<logger
name=
"com.ibatis.common.jdbc.ScriptRunner"
level=
"DEBUG"
/>
<logger
name=
"com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Connection"
level=
"DEBUG"
/>
<logger
name=
"java.sql.Statement"
level=
"DEBUG"
/>
<logger
name=
"java.sql.PreparedStatement"
level=
"DEBUG"
/>
<logger
name=
"com.byit.permission.mapper"
level=
"DEBUG"
></logger>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"file-debug"
/>
<appender-ref
ref=
"file-info"
/>
<appender-ref
ref=
"file-error"
/>
</root>
</configuration>
\ No newline at end of file
byit-screen-computer/src/main/resources/config/pro/application.properties
0 → 100644
View file @
69645267
server.port
=
9101
spring.cloud.config.profile
=
pro
spring.application.name
=
screenservice
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
mybatis.mapper-locations
=
classpath*:mapping/*.xml
eureka.client.service-url.defaultZone
=
http://10.0.10.136:2001/eureka/
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.prefer-ip-address
=
true
eureka.instance.lease-renewal-interval-in-seconds
=
1
eureka.instance.lease-expiration-duration-in-seconds
=
2
logging.config
=
classpath:config/logging-config.xml
logging.path
=
/home/logger/screen_service_log
logging.file
=
screen_service_log
\ No newline at end of file
byit-screen-computer/src/main/resources/config/test/application.properties
0 → 100644
View file @
69645267
server.port
=
9101
spring.cloud.config.profile
=
test
spring.application.name
=
screenservice
spring.datasource.timeBetweenEvictionRunsMillis
=
60000
spring.datasource.validationQuery
=
select 'x'
spring.datasource.testWhileIdle
=
true
spring.datasource.testOnBorrow
=
false
spring.datasource.testOnReturn
=
false
spring.datasource.poolPreparedStatements
=
true
spring.datasource.maxOpenPreparedStatements
=
20
mybatis.mapper-locations
=
classpath*:mapping/*.xml
eureka.client.service-url.defaultZone
=
http://10.0.10.136:2001/eureka/
eureka.instance.instance-id
=
${spring.cloud.client.ipAddress}:${server.port}
eureka.instance.prefer-ip-address
=
true
eureka.instance.lease-renewal-interval-in-seconds
=
1
eureka.instance.lease-expiration-duration-in-seconds
=
2
logging.config
=
classpath:config/logging-config.xml
logging.path
=
/home/logger/screen_service_log
logging.file
=
screen_service_log
\ No newline at end of file
byit-screen-computer/src/main/resources/generator/generatorConfig.xml
0 → 100644
View file @
69645267
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
<!-- 数据库驱动:选择你的本地硬盘上面的数据库驱动包-->
<classPathEntry
location=
"F:\repository\maven\mysql\mysql-connector-java\5.1.35\mysql-connector-java-5.1.35.jar"
/>
<context
id=
"DB2Tables"
targetRuntime=
"MyBatis3"
>
<commentGenerator>
<property
name=
"suppressDate"
value=
"true"
/>
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property
name=
"suppressAllComments"
value=
"true"
/>
</commentGenerator>
<!--数据库链接URL,用户名、密码 -->
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://10.0.10.118:3306/byitscreen"
userId=
"root"
password=
"123456"
>
</jdbcConnection>
<javaTypeResolver>
<property
name=
"forceBigDecimals"
value=
"false"
/>
</javaTypeResolver>
<!-- 生成模型的包名和位置-->
<javaModelGenerator
targetPackage=
"com.byit.screen.model"
targetProject=
"src/main/java"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
<property
name=
"trimStrings"
value=
"true"
/>
</javaModelGenerator>
<!-- 生成映射文件的包名和位置-->
<sqlMapGenerator
targetPackage=
"mapping"
targetProject=
"src/main/resources"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
</sqlMapGenerator>
<!-- 生成DAO的包名和位置-->
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.byit.screen.mapper"
targetProject=
"src/main/java"
>
<property
name=
"enableSubPackages"
value=
"true"
/>
</javaClientGenerator>
<!-- 要生成的表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<table
tableName=
"sys_button"
domainObjectName=
"Button"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
></table>
</context>
</generatorConfiguration>
\ No newline at end of file
byit-screen-service/pom.xml
View file @
69645267
...
@@ -6,12 +6,162 @@
...
@@ -6,12 +6,162 @@
<artifactId>
byit-screen
</artifactId>
<artifactId>
byit-screen
</artifactId>
<groupId>
com.byit.byit-screen
</groupId>
<groupId>
com.byit.byit-screen
</groupId>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath>
../pom.xml
</relativePath>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.byit.byit-screen
</groupId>
<groupId>
com.byit.byit-screen
</groupId>
<artifactId>
byit-screen-service
</artifactId>
<artifactId>
byit-screen-service
</artifactId>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-eureka
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-config-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-feign
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jdbc
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
org.mybatis.spring.boot
</groupId>
<artifactId>
mybatis-spring-boot-starter
</artifactId>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
</dependency>
<!-- 分页 -->
<dependency>
<groupId>
com.github.pagehelper
</groupId>
<artifactId>
pagehelper-spring-boot-starter
</artifactId>
<version>
1.1.2
</version>
</dependency>
<!-- 基础类 -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-core
</artifactId>
</dependency>
<!-- 项目读取配置文件 -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-utils
</artifactId>
</dependency>
<!-- 使用封装redis -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-redis
</artifactId>
</dependency>
<!-- 获取当前用户 -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-currentUser
</artifactId>
</dependency>
<!-- 启动配置连接池 -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-druid
</artifactId>
</dependency>
<!-- 分页 -->
<dependency>
<groupId>
com.byit.common
</groupId>
<artifactId>
byit-common-pageHelper
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<filtering>
true
</filtering>
<directory>
src/main/resources
</directory>
<excludes>
<exclude>
config/dev/*
</exclude>
<exclude>
config/test/*
</exclude>
<exclude>
config/pro/*
</exclude>
</excludes>
</resource>
<resource>
<directory>
src/main/resources/config/${env}/
</directory>
<targetPath>
config/${env}/
</targetPath>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
org.mybatis.generator
</groupId>
<artifactId>
mybatis-generator-maven-plugin
</artifactId>
<version>
1.3.2
</version>
<configuration>
<configurationFile>
${basedir}/src/main/resources/generator/generatorConfig.xml
</configurationFile>
<overwrite>
true
</overwrite>
<verbose>
true
</verbose>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>
dev
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<env>
dev
</env>
</properties>
</profile>
<profile>
<id>
test
</id>
<properties>
<env>
test
</env>
</properties>
</profile>
<profile>
<id>
pro
</id>
<properties>
<env>
pro
</env>
</properties>
</profile>
</profiles>
</project>
</project>
\ No newline at end of file
byit-screen-service/src/main/java/com/byit/ScreenApplication.java
0 → 100644
View file @
69645267
package
com
.
byit
;
import
com.byit.common.utils.PropertiesApplication
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.feign.EnableFeignClients
;
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@MapperScan
(
"com.byit.screen.mapper"
)
@ServletComponentScan
public
class
ScreenApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
springApplication
=
new
SpringApplication
(
ScreenApplication
.
class
);
springApplication
.
setDefaultProperties
(
PropertiesApplication
.
propertiesLoad
(
ScreenApplication
.
class
));
springApplication
.
run
(
args
);
}
}
pom.xml
View file @
69645267
...
@@ -4,12 +4,21 @@
...
@@ -4,12 +4,21 @@
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
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>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
com.byit.parent
</groupId>
<artifactId>
parent
</artifactId>
<version>
0.0.1-SNAPSHOT
</version>
<relativePath/>
</parent>
<groupId>
com.byit.byit-screen
</groupId>
<groupId>
com.byit.byit-screen
</groupId>
<artifactId>
byit-screen
</artifactId>
<artifactId>
byit-screen
</artifactId>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<version>
0.0.1-SNAPSHOT
</version>
<version>
0.0.1-SNAPSHOT
</version>
<modules>
<modules>
<module>
byit-screen-service
</module>
<module>
byit-screen-service
</module>
<module>
byit-screen-computer
</module>
</modules>
</modules>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment