修改common为热插拔自动配置的ssm框架基础
This commit is contained in:
+49
-60
@@ -26,68 +26,9 @@
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
||||
<org.mybatis.version>3.4.1</org.mybatis.version>
|
||||
<org.mybatis.spring.version>1.3.0</org.mybatis.spring.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!--消息总线,配置更新-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
|
||||
</dependency>
|
||||
<!--配置客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
</dependency>
|
||||
<!--服务提供依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-eureka</artifactId>
|
||||
</dependency>
|
||||
<!--服务消费依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-feign</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-ribbon</artifactId>
|
||||
</dependency>
|
||||
<!--服务监控降级熔断-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-hystrix</artifactId>
|
||||
</dependency>
|
||||
<!--服务跟踪-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-sleuth</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zipkin</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!--redis实现session共享-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.session</groupId>
|
||||
<artifactId>spring-session-data-redis</artifactId>
|
||||
</dependency>
|
||||
<!--fm模板引擎-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -147,10 +88,57 @@
|
||||
<artifactId>tomcat-embed-el</artifactId>
|
||||
</dependency>
|
||||
<!-- 工具类 -->
|
||||
<!--提供了丰富的工具类和数据结构-->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>20.0</version>
|
||||
</dependency>
|
||||
|
||||
<!--工具类-->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.5</version>
|
||||
</dependency>
|
||||
|
||||
<!--集合工具类-->
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>3.2.1</version>
|
||||
</dependency>
|
||||
<!--处理时间的依赖-->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- id加密解密 -->
|
||||
<dependency>
|
||||
<groupId>org.hashids</groupId>
|
||||
<artifactId>hashids</artifactId>
|
||||
<version>1.0.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- ftp client -->
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>3.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- file upload springmvc文件上传-->
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.2.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.4</version>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
<!--引入swagger2文档依赖-->
|
||||
<dependency>
|
||||
@@ -175,6 +163,7 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
package com.micro.fast.common;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.cloud.netflix.feign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@SpringCloudApplication
|
||||
@EnableFeignClients
|
||||
/**
|
||||
* 配置类,该类将配置与META-INF/spring.factories文件中用于被EnableAutoConfiguration注解所识别实现自动配置
|
||||
* create by lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
* last edit lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {"com.micro.fast.common.config"})
|
||||
public class CommonApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(CommonApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
package com.micro.fast.common.config;
|
||||
|
||||
import com.alibaba.druid.pool.DruidDataSource;
|
||||
import com.alibaba.druid.support.http.StatViewServlet;
|
||||
import com.alibaba.druid.support.http.WebStatFilter;
|
||||
import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.boot.web.servlet.ServletRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.SQLException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 替换默认的数据源,使用自定义的druid数据源
|
||||
* create by lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
* last edit lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
public class DataSourceConfig {
|
||||
private static final Logger logger = LoggerFactory.getLogger(DataSourceConfig.class);
|
||||
|
||||
@Autowired
|
||||
private JdbcConnectionConfig jdbcConnectionConfig;
|
||||
|
||||
/**
|
||||
* druid的servlet的配置
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public ServletRegistrationBean servletRegistrationBean(){
|
||||
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
|
||||
//注册servlet
|
||||
servletRegistrationBean.setServlet(new StatViewServlet());
|
||||
|
||||
//设置servlet初始化的参数
|
||||
Map<String,String> initParams = new HashMap<>();
|
||||
//设置登录密码
|
||||
initParams.put("loginUsername","root");
|
||||
initParams.put("loginPassword","studyj2e");
|
||||
//设置能否重置
|
||||
initParams.put("resetEnable","false");
|
||||
//deny优先于allow
|
||||
initParams.put("allow","127.0.0.1");
|
||||
initParams.put("deny","213.122.232.233");
|
||||
servletRegistrationBean.setInitParameters(initParams);
|
||||
|
||||
//设置servlet的地址
|
||||
servletRegistrationBean.addUrlMappings("/druid/*");
|
||||
return servletRegistrationBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* druid过滤器的配置
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public FilterRegistrationBean filterRegistrationBean() {
|
||||
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
|
||||
filterRegistrationBean.setFilter(new WebStatFilter());
|
||||
Map<String,String> initParams = new HashMap<>();
|
||||
//设置忽略请求
|
||||
initParams.put("exclusions", "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/static/*,/druid/*");
|
||||
filterRegistrationBean.setInitParameters(initParams);
|
||||
filterRegistrationBean.addUrlPatterns("/*");
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据BeanId来拦截配置 用来bean的监控
|
||||
* @return
|
||||
*/
|
||||
@Bean(value = "druid-stat-interceptor")
|
||||
public DruidStatInterceptor druidStatInterceptor(){
|
||||
DruidStatInterceptor druidStatInterceptor = new DruidStatInterceptor();
|
||||
return druidStatInterceptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置要拦截统计的bean
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public BeanNameAutoProxyCreator beanNameAutoProxyCreator(){
|
||||
BeanNameAutoProxyCreator beanNameAutoProxyCreator = new BeanNameAutoProxyCreator();
|
||||
beanNameAutoProxyCreator.setProxyTargetClass(true);
|
||||
//设置要监控的bean的id
|
||||
beanNameAutoProxyCreator.setBeanNames("userController");
|
||||
//要使用的拦截器
|
||||
beanNameAutoProxyCreator.setInterceptorNames("druid-stat-interceptor");
|
||||
return beanNameAutoProxyCreator;
|
||||
}
|
||||
|
||||
@Bean(name = "dataSource")
|
||||
@Primary
|
||||
public DataSource druidDataSource(){
|
||||
DruidDataSource druidDataSource = new DruidDataSource();
|
||||
//数据库连接的相关配置
|
||||
druidDataSource.setUsername(jdbcConnectionConfig.getUsername());
|
||||
druidDataSource.setPassword(jdbcConnectionConfig.getPassword());
|
||||
druidDataSource.setUrl(jdbcConnectionConfig.getUrl());
|
||||
druidDataSource.setDriverClassName(jdbcConnectionConfig.getDriverClass());
|
||||
//连接池的具体配置
|
||||
druidDataSource.setDefaultAutoCommit(true);
|
||||
druidDataSource.setInitialSize(20);
|
||||
druidDataSource.setMaxActive(50);
|
||||
druidDataSource.setMinIdle(10);
|
||||
druidDataSource.setMaxWait(10);
|
||||
druidDataSource.setMinEvictableIdleTimeMillis(3600000);
|
||||
try {
|
||||
druidDataSource.setFilters("stat,wall");
|
||||
} catch (SQLException e) {
|
||||
if(logger.isErrorEnabled()){
|
||||
logger.error("设置过滤器失败",e);
|
||||
}
|
||||
}
|
||||
return druidDataSource;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.micro.fast.common.config;
|
||||
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 对jdbc连接参数进行从配置文件中读取,校验不能为空
|
||||
* create by lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
* last edit lishouyu 2017/09/09
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
*/
|
||||
@Configuration
|
||||
@AutoConfigureBefore(com.micro.fast.common.config.DataSourceConfig.class)
|
||||
@ConfigurationProperties(prefix = "jdbc")
|
||||
@Validated
|
||||
public class JdbcConnectionConfig {
|
||||
@NotNull
|
||||
private String username;
|
||||
@NotNull
|
||||
private String password;
|
||||
@NotNull
|
||||
private String url;
|
||||
@NotNull
|
||||
private String driverClass;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getDriverClass() {
|
||||
return driverClass;
|
||||
}
|
||||
|
||||
public void setDriverClass(String driverClass) {
|
||||
this.driverClass = driverClass;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.micro.fast.common.config;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.apache.ibatis.plugin.Interceptor;
|
||||
import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.mybatis.spring.SqlSessionFactoryBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
import org.springframework.transaction.annotation.TransactionManagementConfigurer;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
public class SqlSessionFactoryConfig implements TransactionManagementConfigurer{
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
@Bean(name = "sqlSessionFactory")
|
||||
@Primary
|
||||
public SqlSessionFactory sqlSessionFactory(){
|
||||
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
|
||||
//注入数据源
|
||||
sqlSessionFactoryBean.setDataSource(dataSource);
|
||||
//设置实体类所在的位置
|
||||
sqlSessionFactoryBean.setTypeAliasesPackage("com.kklt.pojo");
|
||||
//设置mapper映射文件的位置
|
||||
ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
|
||||
try {
|
||||
sqlSessionFactoryBean.setMapperLocations(
|
||||
resolver.getResources("classpath:/mappers/*.xml"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//设置分页插件
|
||||
PageHelper pageHelper = new PageHelper();
|
||||
Properties properties = new Properties();
|
||||
properties.setProperty("dialect","mysql");
|
||||
pageHelper.setProperties(properties);
|
||||
sqlSessionFactoryBean.setPlugins(new Interceptor[]{pageHelper});
|
||||
//设置详细的配置
|
||||
org.apache.ibatis.session.Configuration configuration = new org.apache.ibatis.session.Configuration();
|
||||
configuration.setMapUnderscoreToCamelCase(true);
|
||||
configuration.setUseColumnLabel(true);
|
||||
configuration.setUseGeneratedKeys(true);
|
||||
//将详细配置放入到sqlSessionFactoryBean中
|
||||
sqlSessionFactoryBean.setConfiguration(configuration);
|
||||
SqlSessionFactory sqlSessionFactory = null;
|
||||
try {
|
||||
sqlSessionFactory = sqlSessionFactoryBean.getObject();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return sqlSessionFactory;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 向事务管理器中注入数据源,由spring来进行事务管理
|
||||
*/
|
||||
@Override
|
||||
@Bean("transactionManager")
|
||||
@Primary
|
||||
public PlatformTransactionManager annotationDrivenTransactionManager() {
|
||||
return new DataSourceTransactionManager(dataSource);
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import java.security.SecureRandom;
|
||||
*
|
||||
* last edit lishouyu 2017/08/21
|
||||
* email 18332763730@163.com
|
||||
*
|
||||
*/
|
||||
public class AESUtil {
|
||||
//编码规则
|
||||
@@ -135,15 +134,4 @@ public class AESUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String[] keys = new String[]{"studyj2e"};
|
||||
System.out.println("key | AESEncode | AESDecode");
|
||||
for (String key : keys) {
|
||||
System.out.print(key+" | ");
|
||||
String aesEncode = AESEncode(key);
|
||||
System.out.print(aesEncode+" | ");
|
||||
String aesDecode = AESDecode(aesEncode);
|
||||
System.out.println(aesDecode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.micro.fast.common.util;
|
||||
|
||||
import com.sun.image.codec.jpeg.JPEGCodec;
|
||||
import com.sun.image.codec.jpeg.JPEGImageEncoder;
|
||||
|
||||
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
@@ -38,13 +38,13 @@ public class WatermarkerUtil {
|
||||
*/
|
||||
private Color fontColor = Color.WHITE;
|
||||
/**
|
||||
* 默认的水印右侧距离原图最右边的距离
|
||||
* 默认的水印左侧距离原图最左边的距离
|
||||
*/
|
||||
private int x = 10;
|
||||
private int x = 5;
|
||||
/**
|
||||
* 默认的水印的下侧距离原图下侧的距离
|
||||
*/
|
||||
private int y = 10;
|
||||
private int y = 5;
|
||||
/**
|
||||
* 默认的透明度
|
||||
*/
|
||||
@@ -87,13 +87,14 @@ public class WatermarkerUtil {
|
||||
}
|
||||
//7.设置水印透明的样式
|
||||
graphics.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_ATOP,alpha));
|
||||
//8.将文字画在图片之上,放在右下角.参数x表示是文字的左侧距离图片左侧的距离,文字的右侧表示是文字的下侧距离图片上册的距离
|
||||
graphics.drawString(text,width-(x+textLength),height-(y));
|
||||
//8.将文字画在图片之上,放在右下角.参数x表示是文字的左侧距离图片左侧的距离,文字的右侧表示是文字的下侧距离图片上侧的距离
|
||||
graphics.drawString(text,x,height-(y));
|
||||
graphics.dispose();
|
||||
//9.将bufferImage输出成文件,使用uuid避免文件名重复
|
||||
file = new File(filePath + "/" + UUID.randomUUID()+ imageName);
|
||||
JPEGImageEncoder img = JPEGCodec.createJPEGEncoder(new FileOutputStream(file));
|
||||
img.encode(bufferedImage);
|
||||
int lastIndexOf = imageName.lastIndexOf(".");
|
||||
String extensionName = imageName.substring(lastIndexOf+1);
|
||||
ImageIO.write(bufferedImage,extensionName,new FileOutputStream(file));
|
||||
//10.返回加上水印之后的图片文件对象
|
||||
return file;
|
||||
} catch (IOException e) {
|
||||
@@ -121,8 +122,9 @@ public class WatermarkerUtil {
|
||||
textWidth +=0.5F;
|
||||
}
|
||||
}
|
||||
//2.等同的中文字符向上取整然后乘于单个字符的宽度
|
||||
return (int) Math.ceil(textWidth)*fontSize;
|
||||
|
||||
//2.等同的中文字符向上取整然后乘于单个中文字符的宽度,
|
||||
return Math.round(textWidth)*fontSize;
|
||||
}
|
||||
|
||||
public String getFontFamily() {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# 自动化装配
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.micro.fast.common.CommonApplication
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.micro.fast.common;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class CommonApplicationTests {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.micro.fast.common.util;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
public class AESUtilTest {
|
||||
@Test
|
||||
public void AESEncode() throws Exception {
|
||||
String[] keys = new String[]{"studyj2e"};
|
||||
System.out.println("key | AESEncode | AESDecode");
|
||||
for (String key : keys) {
|
||||
System.out.print(key+" | ");
|
||||
String aesEncode = AESUtil.AESEncode("li");
|
||||
System.out.print(aesEncode+" | ");
|
||||
String aesDecode = AESUtil.AESDecode(aesEncode);
|
||||
System.out.println(aesDecode);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void AESDecode() throws Exception {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@ import static org.junit.Assert.*;
|
||||
public class WatermarkerUtilTest {
|
||||
@Test
|
||||
public void markerWord() throws Exception {
|
||||
new WatermarkerUtil().markerWord("李守余",new File("/root/dev/u=132629542,1898058257&fm=27&gp=0.jpg"),"/home");
|
||||
new WatermarkerUtil().markerWord("www.suixiangcang.com",new File("/root/dev/u=132629542,1898058257&fm=27&gp=0.jpg"),"/home");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,10 +20,10 @@
|
||||
<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
|
||||
</properties>
|
||||
<modules>
|
||||
<module>common</module>
|
||||
<module>config-server</module>
|
||||
<module>eureka-server</module>
|
||||
<module>eureka-server2</module>
|
||||
<module>upms</module>
|
||||
<module>common</module>
|
||||
</modules>
|
||||
</project>
|
||||
|
||||
@@ -68,6 +68,11 @@
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.micro.fast</groupId>
|
||||
<artifactId>common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<dependencyManagement>
|
||||
|
||||
Reference in New Issue
Block a user