代码优化
This commit is contained in:
@@ -10,6 +10,7 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import com.jeesite.common.mybatis.MyBatisFactoryBean;
|
||||
import com.jeesite.modules.msg.service.MsgInnerService;
|
||||
import com.jeesite.modules.sys.service.AreaService;
|
||||
import com.jeesite.modules.sys.service.CompanyService;
|
||||
import com.jeesite.modules.sys.service.EmpUserService;
|
||||
@@ -76,4 +77,10 @@ public class SysAutoConfiguration {
|
||||
return new PostServiceSupport();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnMissingBean
|
||||
public MsgInnerService msgInnerService(){
|
||||
return new MsgInnerService();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,6 @@ import java.util.concurrent.ThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.callback.MethodCallback;
|
||||
@@ -46,9 +44,7 @@ import io.netty.util.concurrent.DefaultThreadFactory;
|
||||
* @author ThinkGem
|
||||
* @version 2019-03-12
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
@ConditionalOnBean(MsgInnerDao.class)
|
||||
public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -9,7 +9,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
@@ -36,7 +35,6 @@ import com.jeesite.modules.msg.service.MsgInnerService;
|
||||
@Controller
|
||||
@RequestMapping(value = "${adminPath}/msg/msgInner")
|
||||
@ConditionalOnProperty(name="web.core.enabled", havingValue="true", matchIfMissing=true)
|
||||
@ConditionalOnBean(MsgInnerService.class)
|
||||
public class MsgInnerController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -639,6 +639,7 @@ error:
|
||||
#======== FileUpload settings =========#
|
||||
#======================================#
|
||||
|
||||
# 文件上传
|
||||
file:
|
||||
enabled: true
|
||||
|
||||
|
||||
@@ -800,6 +800,7 @@ error:
|
||||
#======== FileUpload settings =========#
|
||||
#======================================#
|
||||
|
||||
# 文件上传
|
||||
file:
|
||||
enabled: true
|
||||
|
||||
|
||||
10
web/pom.xml
10
web/pom.xml
@@ -86,16 +86,6 @@
|
||||
<scope>provided</scope>
|
||||
</dependency> -->
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>de.codecentric</groupId>
|
||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
||||
<version>2.5.6</version>
|
||||
</dependency> -->
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -800,6 +800,7 @@ error:
|
||||
#======== FileUpload settings =========#
|
||||
#======================================#
|
||||
|
||||
# 文件上传
|
||||
file:
|
||||
enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user