代码优化

This commit is contained in:
thinkgem
2022-04-21 18:54:13 +08:00
parent ddc67f0189
commit a0d6ef9097
7 changed files with 10 additions and 16 deletions

View File

@@ -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();
}
}

View File

@@ -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

View File

@@ -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

View File

@@ -639,6 +639,7 @@ error:
#======== FileUpload settings =========#
#======================================#
# 文件上传
file:
enabled: true

View File

@@ -800,6 +800,7 @@ error:
#======== FileUpload settings =========#
#======================================#
# 文件上传
file:
enabled: true

View File

@@ -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>

View File

@@ -800,6 +800,7 @@ error:
#======== FileUpload settings =========#
#======================================#
# 文件上传
file:
enabled: true