小编Tim*_*uti的帖子

Spring Boot ConflictingBeanDefinitionException:@Controller类的注释指定bean名称

我在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)

java spring spring-mvc spring-security spring-boot

17
推荐指数
4
解决办法
3万
查看次数

R Shiny:删除ggplot2背景以使其透明

我希望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)

但渲染的图形仍然具有白色背景,我希望它是透明的,而不是白色.我该如何实现这一目标?我附上了带有箭头的图像,显​​示了情节. 我闪亮的服务器应用. 请注意,饼图有一个白色背景,我希望它是透明的

我如何更改此背景?请帮我.

r ggplot2 shiny

16
推荐指数
1
解决办法
8870
查看次数

当selectInput值改变时,R Shiny switch tabPanel

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

r shiny

4
推荐指数
1
解决办法
2078
查看次数

标签 统计

r ×2

shiny ×2

ggplot2 ×1

java ×1

spring ×1

spring-boot ×1

spring-mvc ×1

spring-security ×1