我在Spring启动应用程序中不断收到ConflictingBeanDefinitionException错误.我不完全确定如何解决它,我有几个@Configuration注释类帮助建立Thymeleaf,Spring Security和Web.为什么应用程序试图设置homeController两次?(它在哪里尝试这样做?)
错误是:
org.springframework.beans.factory.BeanDefinitionStoreException:
Failed to parse configuration class [org.kemri.wellcome.hie.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException:
Annotation-specified bean name 'homeController' for bean class [org.kemri.wellcome.hie.HomeController] conflicts with existing, non-compatible bean definition of same name and class [org.kemri.wellcome.hie.controller.HomeController]
Run Code Online (Sandbox Code Playgroud)
我的spring boot主应用程序初始化程序:
@EnableScheduling
@EnableAspectJAutoProxy
@EnableCaching
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected final SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
return application.sources(Application.class);
}
}
Run Code Online (Sandbox Code Playgroud)
我的数据库配置文件:
@Configuration
@EnableTransactionManagement
@EnableJpaRepositories(basePackages="org.kemri.wellcome.hie.repositories")
@PropertySource("classpath:application.properties")
public class DatabaseConfig {
@Autowired
private …Run Code Online (Sandbox Code Playgroud) 我希望R Shiny Server上的ggplots具有透明性.我用于绘图的ui.R如下:
plotOutput("malPie", width="95%")
Run Code Online (Sandbox Code Playgroud)
在server.R我的绘图功能如下:
c <- ggplot(dataFrame, aes(x=factor(nrow(dataFrame)),fill=graphX),environment=environment()) + geom_bar(width = 1)
print(c + coord_polar(theta = "y")+ xlab(xLabel)+ylab(yLabel)+ labs(fill=legendTitle)+ theme(
panel.grid.minor = element_blank(),
panel.grid.major = element_blank(),
panel.background = element_blank(),
plot.background = element_blank()
))
Run Code Online (Sandbox Code Playgroud)
它叫做的地方:
sub <- data
sub <- subset(sub,sub$mal_tested=="1")
drawGraph("pie",sub,factor(sub$mal_tested_pos),"Malaria Tests Done",NULL,"Malaria Tested Positive","Malaria")
Run Code Online (Sandbox Code Playgroud)
但渲染的图形仍然具有白色背景,我希望它是透明的,而不是白色.我该如何实现这一目标?我附上了带有箭头的图像,显示了情节.

我如何更改此背景?请帮我.
我正在尝试在selectInput的值更改时动态切换tabsetPanel中的活动tabPanel.我怎么能做到这一点?