草庐IT

configurer

全部标签

java - Spring Boot : configure Sqlite database

我正在尝试使用Sqlite数据库创建一个spring-boot应用程序。我在pom中添加了sqlite-jdbc和sqlite-dialect依赖。4.0.0com.examplespring-boot-app1.0-SNAPSHOTjarorg.springframework.bootspring-boot-starter-parent1.5.2.RELEASEUTF-81.81.8org.springframework.bootspring-boot-starter-weborg.springframework.bootspring-boot-starter-data-jpaorg

java - https : The Tomcat connector configured to listen on port 8444 failed to start.之后的 Spring 启动

我按照指南在SpringBoot中启用https。该应用程序之前正在处理https://localhost:8080我创建了一个keystore.jks,它与我的application.properties位于同一目录中,现在看起来像:#Defineacustomportinsteadofthedefault8080server.port=8444#TellSpringSecurity(ifused)torequirerequestsoverHTTPSsecurity.require-ssl=true#Theformatusedforthekeystoreserver.ssl.key-

java - 为什么我必须在 @Configuration 注释注释的 Spring 配置类中有一个默认构造函数?

我正在学习SpringCore认证,关于提供的学习资料,我有这个问题,但我无法给出答案。Whymustyouhavetohaveadefaultconstructorinyour@Configurationannotatedclass?我没有在@Configuration注释注释的配置类中声明任何构造函数。默认构造函数是父类(superclass)继承的那个?或者是什么?为什么我必须有一个默认构造函数而我不能覆盖它?Tnx 最佳答案 根据officialspringjavadoc,spring@Configuration注解的类需要

java - Spring多个@Configuration类

我正在使用Spring@Configuration注释来配置我的应用程序。目前,我有一个@Configuration类,其中声明了我的所有bean。随着bean的数量不断增加(超过30个),我想将其拆分为多个类。一些bean使用通用类(主要是实用程序类):Foo.class是一个实用类Bar.class和Baz.class都使用Foo.class我想将所有Foo、Bar和Baz放在三个不同的@Configuration类中(分别为Conf1、Conf2和Conf3)问题是我无法从Conf2和Conf3访问Conf1的实例:Conf1.class@Configurationpublicc

java - 用@Configuration 和@Controller 注释了一个类。在重构方面需要帮助

下面是我的类(class),我必须同时使用@Configuration和@Controller因为应该只有一个Thymeleaf实例整个应用程序,否则我会得到异常(exception)。我的其他类用@RequestScope注释,所以我不能使用单例范围的bean。所以我混合了配置和Controller来获得结果,但我觉得这是一个不好的做法。我将不胜感激任何帮助重构代码并消除不良做法。更新我正在使用spring-boot1.5.14。我正在使用以下方法处理模板并将处理后的模板保留为字符串。@Controller@Configuration@EnableWebMvc@Application

Springboot :BeanDefinitionStoreException: Failed to parse configuration class

我正在尝试通过运行使用maven创建的jar来执行我的springboot应用程序,并遇到异常,经过多次尝试后仍未解决。任何帮助或指针将不胜感激。提前致谢。请在下面找到异常跟踪。2016-01-2811:35:42.034INFO3732---[main]Application:StartingApplicationonDFWLW72RTG262withPID3732(C:\project\RestSpringBoot\target\springboot-0.0.1-SNAPSHOT.jarstartedbyvaiguptainC:\project\RestSpringBoot\tar

java - Spring 启动 : Configuration Class is simply ignored and not loaded

我的一些@SpringBootApplication的类路径中有以下@Configuration类:@Configuration@Import({MainConfig.class,RestConfig.class})publicclassApiConfig{@Bean@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)publicClientclient()throwsExecutionException,InterruptedException{returnservice.create(Client.class);}}我有两个使用此配置的服务

hibernate - ehcache 警告消息 "No configuration found"

应用程序启动时我收到以下警告。2009-05-1309:19:41,171WARNnet.sf.ehcache.config.Configurator-Noconfigurationfound.Configuringehcachefromehcache-failsafe.xmlfoundintheclasspath:jar:file:/app/java/lib/ehcache-1.1.jar!/ehcache-failsafe.xml我在以下url中找到了encache代码..ConfigurationFactoryCode应用程序正在尝试加载ehcache.xml但找不到该文件,因此

spring - 警告 @Configuration 类上的非静态 ConfigurationClassPostProcessor 声明

我使用Spring4.2.6.RELEASE。在我的应用程序初始化期间,我收到这样的警告:[WARN]org.springframework.context.annotation.ConfigurationClassPostProcessorenhanceConfigurationClasses:Cannotenhance@Configurationbeandefinition'org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfi

java - 相当于 mvc :default-servlet-handler in Spring annotation-based configuration?

是否有可能拥有的等价物?在AnnotationConfig(Web)ApplicationContext中定义?现在我有:@Configuration@ImportResource("classpath:/mvc-resources.xml")classAppConfig{//Otherconfiguration...}在我的resources/mvc-resources.xml中只有以下内容:它按预期工作。是否可以在不导入XML文件的情况下执行此操作?这将是减少一些样板的好方法。 最佳答案 如果您使用带有WebMvc的Spring