@@ -108,6 +108,8 @@ protected RepositoryFactorySupport doCreateRepositoryFactory() {
108108 @ Autowired
109109 protected void setMappingContext (RelationalMappingContext mappingContext ) {
110110
111+ Assert .notNull (mappingContext , "MappingContext must not be null" );
112+
111113 super .setMappingContext (mappingContext );
112114 this .mappingContext = mappingContext ;
113115 }
@@ -119,6 +121,9 @@ protected void setMappingContext(RelationalMappingContext mappingContext) {
119121 */
120122 @ Autowired
121123 protected void setDialect (Dialect dialect ) {
124+
125+ Assert .notNull (dialect , "Dialect must not be null" );
126+
122127 this .dialect = dialect ;
123128 }
124129
@@ -128,6 +133,9 @@ protected void setDialect(Dialect dialect) {
128133 * @param dataAccessStrategy can be {@literal null}.
129134 */
130135 public void setDataAccessStrategy (DataAccessStrategy dataAccessStrategy ) {
136+
137+ Assert .notNull (dataAccessStrategy , "DataAccessStrategy must not be null" );
138+
131139 this .dataAccessStrategy = dataAccessStrategy ;
132140 }
133141
@@ -140,6 +148,9 @@ public void setDataAccessStrategy(DataAccessStrategy dataAccessStrategy) {
140148 */
141149 @ Autowired (required = false )
142150 public void setQueryMappingConfiguration (QueryMappingConfiguration queryMappingConfiguration ) {
151+
152+ Assert .notNull (queryMappingConfiguration , "QueryMappingConfiguration must not be null" );
153+
143154 this .queryMappingConfiguration = queryMappingConfiguration ;
144155 }
145156
@@ -149,6 +160,9 @@ public void setQueryMappingConfiguration(QueryMappingConfiguration queryMappingC
149160 * @param operations the operations
150161 */
151162 public void setJdbcOperations (NamedParameterJdbcOperations operations ) {
163+
164+ Assert .notNull (operations , "NamedParameterJdbcOperations must not be null" );
165+
152166 this .operations = operations ;
153167 }
154168
@@ -159,6 +173,9 @@ public void setJdbcOperations(NamedParameterJdbcOperations operations) {
159173 */
160174 @ Autowired
161175 public void setConverter (JdbcConverter converter ) {
176+
177+ Assert .notNull (converter , "JdbcConverter must not be null" );
178+
162179 this .converter = converter ;
163180 }
164181
0 commit comments