Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
石磊
/
cihai
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ec59bca0
authored
Dec 06, 2017
by
石头
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交admin
1 parent
1b683692
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
234 deletions
serverside/cihai-app/pom.xml
serverside/cihai-app/src/main/java/com/dookay/cihai/app/CihaiAppApplication.java
serverside/cihai-app/src/main/java/com/dookay/cihai/app/config/SwaggerConfig.java
serverside/cihai-app/src/main/java/com/dookay/cihai/app/config/WebMvcConfig.java
serverside/cihai-core/pom.xml
serverside/cihai-core/src/main/java/com/dookay/cihai/core/CihaiCoreMarker.java
serverside/cihai-core/src/test/java/com/dookay/cihai/core/CihaiCoreApplicationTests.java
serverside/pom.xml
serverside/cihai-app/pom.xml
deleted
100644 → 0
View file @
1b68369
<?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>
cihai
</artifactId>
<groupId>
com.dookay
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
cihai-app
</artifactId>
<packaging>
war
</packaging>
<properties>
<maven.test.skip>
true
</maven.test.skip>
<jetty.scope>
compile
</jetty.scope>
</properties>
<dependencies>
<dependency>
<groupId>
com.dookay
</groupId>
<artifactId>
coral-common-web
</artifactId>
</dependency>
<dependency>
<groupId>
com.dookay
</groupId>
<artifactId>
cihai-core
</artifactId>
</dependency>
<!--开发工具-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-devtools
</artifactId>
<scope>
runtime
</scope>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
<!--表现层-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<exclusions>
<exclusion>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
jstl
</artifactId>
<scope>
${jetty.scope}
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-jetty
</artifactId>
<scope>
${jetty.scope}
</scope>
</dependency>
<dependency>
<groupId>
org.eclipse.jetty
</groupId>
<artifactId>
apache-jsp
</artifactId>
<scope>
${jetty.scope}
</scope>
</dependency>
<!--表现层-->
<!--工具-->
<dependency>
<groupId>
com.fasterxml.jackson.datatype
</groupId>
<artifactId>
jackson-datatype-jsr310
</artifactId>
</dependency>
<!--接口文档-->
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
</dependency>
<!--接口文档-->
</dependencies>
</project>
serverside/cihai-app/src/main/java/com/dookay/cihai/app/CihaiAppApplication.java
deleted
100644 → 0
View file @
1b68369
package
com
.
dookay
.
cihai
.
app
;
import
com.dookay.coral.common.core.CoralCommonCoreMarker
;
import
com.dookay.coral.common.web.CoralCommonWebMarker
;
import
com.dookay.cihai.core.CihaiCoreMarker
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.support.SpringBootServletInitializer
;
import
org.springframework.cache.annotation.EnableCaching
;
/**
* 项目运行入口
*
* @author houkun
*/
@SpringBootApplication
(
// 加载不同模块的配置与待注入的Bean
scanBasePackageClasses
=
{
CoralCommonCoreMarker
.
class
,
CoralCommonWebMarker
.
class
,
CihaiCoreMarker
.
class
,
CihaiAppApplication
.
class
,
})
@ServletComponentScan
(
basePackageClasses
=
{
CoralCommonWebMarker
.
class
,
CihaiAppApplication
.
class
})
@MapperScan
(
basePackageClasses
=
CihaiCoreMarker
.
class
)
@EnableCaching
public
class
CihaiAppApplication
extends
SpringBootServletInitializer
{
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
builder
)
{
return
builder
.
sources
(
CihaiAppApplication
.
class
);
}
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
CihaiAppApplication
.
class
,
args
);
}
}
serverside/cihai-app/src/main/java/com/dookay/cihai/app/config/SwaggerConfig.java
deleted
100644 → 0
View file @
1b68369
package
com
.
dookay
.
cihai
.
app
.
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.builders.RequestHandlerSelectors
;
import
springfox.documentation.service.ApiInfo
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
/**
* 接口文档配置
*
* @author houkun
*/
@Configuration
@EnableSwagger2
public
class
SwaggerConfig
{
@Bean
public
Docket
demoApi
()
{
return
new
Docket
(
DocumentationType
.
SWAGGER_2
)
.
apiInfo
(
apiInfo
())
.
select
()
.
apis
(
RequestHandlerSelectors
.
any
())
.
paths
(
PathSelectors
.
any
())
.
build
();
}
private
ApiInfo
apiInfo
()
{
return
new
ApiInfoBuilder
()
.
title
(
"Coral Demo 示例接口文档"
)
.
description
(
"示例描述"
)
.
version
(
"0.1"
)
.
build
();
}
}
serverside/cihai-app/src/main/java/com/dookay/cihai/app/config/WebMvcConfig.java
deleted
100644 → 0
View file @
1b68369
package
com
.
dookay
.
cihai
.
app
.
config
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
/**
* Web config
*
* @author houkun
*/
@Configuration
public
class
WebMvcConfig
extends
WebMvcConfigurerAdapter
{
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"swagger-ui.html"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/"
);
registry
.
addResourceHandler
(
"/webjars/**"
)
.
addResourceLocations
(
"classpath:/META-INF/resources/webjars/"
);
}
}
serverside/cihai-core/pom.xml
View file @
ec59bca
...
...
@@ -34,6 +34,10 @@
<artifactId>
lombok
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
com.dookay
</groupId>
<artifactId>
coral-builder
</artifactId>
</dependency>
<!--开发工具-->
</dependencies>
...
...
serverside/cihai-core/src/main/java/com/dookay/cihai/core/CihaiCoreMarker.java
deleted
100644 → 0
View file @
1b68369
package
com
.
dookay
.
cihai
.
core
;
import
com.dookay.coral.common.core.CoralCommonCoreMarker
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cache.annotation.EnableCaching
;
/**
* @author houkun
*/
public
interface
CihaiCoreMarker
{
}
serverside/cihai-core/src/test/java/com/dookay/cihai/core/CihaiCoreApplicationTests.java
deleted
100644 → 0
View file @
1b68369
package
com
.
dookay
.
cihai
.
core
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.annotation.Rollback
;
import
org.springframework.test.context.junit4.SpringRunner
;
import
org.springframework.transaction.annotation.Transactional
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
webEnvironment
=
SpringBootTest
.
WebEnvironment
.
NONE
)
@Rollback
@Transactional
@MapperScan
(
basePackageClasses
=
CihaiCoreMarker
.
class
)
public
class
CihaiCoreApplicationTests
{
@Test
public
void
contextLoads
()
{
}
}
serverside/pom.xml
View file @
ec59bca
...
...
@@ -43,6 +43,11 @@
<artifactId>
coral-common-web
</artifactId>
<version>
${dookay.common.version}
</version>
</dependency>
<dependency>
<groupId>
com.dookay
</groupId>
<artifactId>
coral-builder
</artifactId>
<version>
2.0
</version>
</dependency>
<!--稻壳基础库-->
<!--项目内依赖-->
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment